OL98: Removing Meeting Appointments from Attendees' CalendarsID: Q180973
|
When using the Meeting Planner in Microsoft Outlook, you can invite others to a meeting by sending meeting requests that are automatically processed and placed on the attendees' calendars. Outlook does not have a feature that enables you to send a cancellation request that automatically removes a meeting appointment from the attendees' calendars.
To work around this, use either of the following methods:
http://www.microsoft.com/support/supportnet/refguide/The following Visual Basic for Applications automation code can be used to delete a meeting from another user's calendar. The sample code deletes a meeting for January 1, 1997 at 9:00 AM from the calendar of a user named johndoe.
Sub RemoveAppt()
Set myOlApp = CreateObject("Outlook.Application")
Set olns = myOlApp.GetNameSpace("MAPI")
mymail = "johndoe"
Set myRecip = olns.CreateRecipient(mymail)
myRecip.Resolve
If myRecip.Resolved Then
Set MyFolder = olNS.GetSharedDefaultFolder(myRecip,olFolderCalendar)
day1 = "1/1/97 9:00 AM"
Set MyAppointments = MyFolder.Items
Set MyAppt = myappointments.Find("[Start] = """ & day1 & """")
If MyAppt Is Nothing Then
MsgBox "Appointment not found."
Else
MyAppt.Delete
End If
Else
MsgBox "Could not resolve e-mail name"
End If
End Sub
For more information about creating solutions with Microsoft Outlook 98, please see the following articles in the Microsoft Knowledge Base:
Q180826 OL98: Resources for Custom Forms and Programming
Q182349 OL98: Questions About Custom Forms and Outlook Solutions
Additional query words: OutSol OutSol98
Keywords : GnlCal
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: August 5, 1999