C
cybergeek3191
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(OlDefaultFolders.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
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(OlDefaultFolders.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