Copy Internet Calendar appointment

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
 
K

Ken Slovak - [MVP - Outlook]

A Move is a Copy followed by a Delete. If this is a read-only folder any
Move would fail.
 
S

Sue Mosher [MVP-Outlook]

The workaround would be to create a new appointment and set its properties to match the values from the one in the internet calendar.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top