A Move is a Copy followed by a Delete. If this is a read-only folder any
Move would fail.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
wrote in message
ups.com...
When I try to use an addin to automatically copy items from an Internet
Calendar to the default calendar, I get a COMException (0x80020009:
Cannot move the item) when I try to use AppointmentItem.Move(). The
code looks something like this:
Imports Microsoft.Office.Interop.Outlook
Private Sub InternetCalendarItems_ItemAdd(ByVal item As Object) Handles
InternetCalendarItems.ItemAdd, InternetCalendarItems.ItemChanged
Dim copy As AppointmentItem
Dim source As AppointmentItem
source = item
' do some processing to get rid of duplicates in the default calendar;
this part works fine
copy = source.Copy()
copy.Move(Application.Session.GetDefaultFolder(OlD efaultFolders.olFolderCalendar))
' this line throws the exception
End Sub
The exception stems from the Internet Calendar folder being read-only,
but is there a way to copy the items out of the calendar without
throwing the exception?
Thanks in advance,
J. Paupore