Article ID: 180973
Article Last Modified on 11/23/2006
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
Additional query words: OutSol OutSol98
Keywords: kbhowto KB180973