PC Review


Reply
Thread Tools Rate Thread

Copy Appointments to Exchange Calendar

 
 
=?Utf-8?B?S2VpdGggQnJvd24=?=
Guest
Posts: n/a
 
      24th Jun 2005
I am using Outlook 2003. I download all my emails, appointments, etc. to my
local machine to the .pst file. When I accept a meeting it shows up on my
local calendar. I share out my calendar on the Exchange Server and so I have
to manually copy all my meetings to the Exchange calendar on a daily basis to
make sure people who are trying to invite me to meetings can see the latest
calendar.

I saw a post recently where the user wanted to copy items from a selected
calendar to the default calendar. I have included that code below, it works
great. However, are there modifications that can be done to it to make it
copy the selected appointments and copy them from my default calendar to the
calendar on the exchange server?

Sub CopyAppointmentItem()
Dim objNS As Outlook.NameSpace
Dim objAppt As Outlook.AppointmentItem
Dim objCopiedAppt As Outlook.AppointmentItem

If ActiveExplorer.Selection.Count = 0 Then Exit Sub

Set objNS = Application.GetNamespace("MAPI")
For Each objAppt In ActiveExplorer.Selection
Set objCopiedAppt = objAppt.Copy
objCopiedAppt.Move objNS.GetDefaultFolder(olFolderCalendar)
Next

Set objAppt = Nothing
Set objCopiedAppt = Nothing
Set objNS = Nothing
End

Thanks,
Keith
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      28th Jun 2005
To copy the selected appointments to a non-default Calendar, you need to
obtain a MAPIFolder reference for that folder by walking the Folders
collection of the Public Folders.

e.g.

Set myFolder = objNS.Folders.Item("Public Folders")
Set myFolder= myFolder.Folders("All Public Folders")
Set myFolder= myFolder.Folders("My Public Calendar Folder")
etc.

Otherwise, if you know the EntryID of the public folder, you can call the
NameSpace.GetFolderFromID method to obtain it directly without any folder
parsing required.

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Keith Brown" wrote:

> I am using Outlook 2003. I download all my emails, appointments, etc. to my
> local machine to the .pst file. When I accept a meeting it shows up on my
> local calendar. I share out my calendar on the Exchange Server and so I have
> to manually copy all my meetings to the Exchange calendar on a daily basis to
> make sure people who are trying to invite me to meetings can see the latest
> calendar.
>
> I saw a post recently where the user wanted to copy items from a selected
> calendar to the default calendar. I have included that code below, it works
> great. However, are there modifications that can be done to it to make it
> copy the selected appointments and copy them from my default calendar to the
> calendar on the exchange server?
>
> Sub CopyAppointmentItem()
> Dim objNS As Outlook.NameSpace
> Dim objAppt As Outlook.AppointmentItem
> Dim objCopiedAppt As Outlook.AppointmentItem
>
> If ActiveExplorer.Selection.Count = 0 Then Exit Sub
>
> Set objNS = Application.GetNamespace("MAPI")
> For Each objAppt In ActiveExplorer.Selection
> Set objCopiedAppt = objAppt.Copy
> objCopiedAppt.Move objNS.GetDefaultFolder(olFolderCalendar)
> Next
>
> Set objAppt = Nothing
> Set objCopiedAppt = Nothing
> Set objNS = Nothing
> End
>
> Thanks,
> Keith

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interfaces to MS Exchange/Outlook to add Calendar appointments or EMcCarthy Microsoft Dot NET 2 13th Mar 2008 12:20 PM
Exchange 2003 - Calendar Events and appointments hang in que jlvandusen@msn.com Microsoft Outlook Discussion 0 15th Feb 2008 02:11 PM
How long does outlook/exchange retain calendar appointments? =?Utf-8?B?TmVpbCBEb2JpZXI=?= Microsoft Outlook Calendar 3 29th Nov 2006 04:08 AM
Outlook 2003/Exchange: How to automatically copy meetings between personal Calendar & Exchange Calendar Leon Microsoft Outlook Calendar 3 27th Apr 2004 11:00 PM
Outlook/Exchange: Public appointments copied to personal calendar. How to stop? Craig Microsoft Outlook 0 17th Mar 2004 06:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:12 AM.