Remove Meeting from Sender's Calendar with VBA

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I have code set up in an Access 2003 db to send a meeting invite to a
recipient and it works fine. The problem is I do not want the sender to have
this sent meeting on their calendar. How do I prevent it from showing up on
the sender's calendar and only the recipient has the appointment? Or can it
be deleted programmatically from the sender's calendar after it is sent to
the recipient?

Here is my code:

Sub ScheduleMeeting()
Dim myOlApp As Outlook.Application
Dim myItem As Outlook.AppointmentItem
Dim myRequiredAttendee As Outlook.Recipient
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olAppointmentItem)
myItem.MeetingStatus = olMeeting
myItem.Subject = "Strategy Meeting"
myItem.Location = "Conference Room B"
myItem.Start = #1/9/2009 1:30:00 PM#
myItem.Duration = 60
myItem.ReminderMinutesBeforeStart = 15
Set myRequiredAttendee = myItem.Recipients.Add("(e-mail address removed)")
myRequiredAttendee.Type = olRequired
myItem.Send
End Sub
 
I think I may have answered my own question. I just these two lines of code:

myItem.MeetingStatus = olMeetingCanceled
myItem.Delete

to the end of my procedure and the meeting is removed from the sender's
calendar without affecting the recipient's calendar.
 
Back
Top