How to create an appointment without having the creating account being an attendee?

D

Don

Is there any way to create an appointment without including the creator
of the appointment in the appointment? For example, if I use the
following code to create an appointment for someone else, it always
includes me in the attendees. I have tried a few things so far without
any luck.

Thanks!

Sub Go()
' Create an Outlook application.
Dim oApp As Application = New Application

' Get NameSpace and Logon.
Dim oNS As [NameSpace] = oApp.GetNamespace("mapi")
oNS.Logon("", "", False, True)

' Create a new AppointmentItem.
Dim oAppt As AppointmentItem =
oApp.CreateItem(OlItemType.olAppointmentItem)

' Set some common properties.
oAppt.Subject = Me.txtSubject.Text
oAppt.Body = Me.txtBody.Text
oAppt.Location = Me.txtLocation.Text
oAppt.RequiredAttendees = Me.txtRequired.Text

oAppt.Start = calStart.Value
oAppt.End = calEnd.Value

oAppt.ReminderSet = True
oAppt.ReminderMinutesBeforeStart = 5
oAppt.BusyStatus = OlBusyStatus.olBusy ' olBusy
oAppt.IsOnlineMeeting = False

oAppt.ResponseRequested = False
oAppt.OptionalAttendees = Me.txtOptional.text

' Save to Calendar.
oAppt.Save()

' Logoff.
oNS.Logoff()

' Clean up.
oApp = Nothing
oNS = Nothing
oAppt = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top