A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Copy Internet Calendar appointment



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 18th 06, 02:23 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 1
Default Copy Internet Calendar appointment

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

  #2  
Old November 19th 06, 08:03 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Copy Internet Calendar appointment

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


  #3  
Old November 19th 06, 11:32 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Copy Internet Calendar appointment

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy appointment from shared calendar to personal calendar mwaa Outlook - Calandaring 1 November 15th 06 10:51 PM
How do I copy someone about an appointment without inviting them? Karen Outlook - Calandaring 1 October 13th 06 08:23 PM
copy appointment to another date help! Outlook - Calandaring 1 October 5th 06 03:54 PM
How can I automatically copy an appointment to another calendar Erin Outlook - Calandaring 0 February 2nd 06 06:49 PM
Copy of Outlook 2002 appointment sent to Public Folder calendar gets to another calendar QH Outlook - Calandaring 1 February 2nd 06 03:45 PM


All times are GMT +1. The time now is 12:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.