G
Guest
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
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