| Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
You can invite additional attendees to a meeting that already exists in your calendar folder. The IAppointment.Invite method returns a Calendar Message object that you send to the attendees being added.
For information on how to forward a meeting request from your inbox, see Forwarding a Meeting Request.
If the organizer of the meeting invites additional attendees, the meeting in the organizer's calendar folder is updated with the new attendee names. If an attendee invites additional attendees, the attendee list is not updated in the attendee's or organizer's calendar. When the new attendee responds to the meeting request, the organizer can choose to add the new attendee to the attendee list.
Because a new meeting request is not sent to existing attendees, their calendars are not updated with the new attendee names.
The basic process for inviting attendees to a meeting in the calendar folder is as follows:
The following code example opens a meeting in the calendar folder of a specific user, forwards the meeting to two new attendees, and then saves the updated meeting.
In this example, the meeting is selected based on subject.
Dim Rs As New ADODB.Recordset
Dim Rec As New ADODB.Record
Dim Conn As New ADODB.Connection
Dim iAppt As New Appointment
Dim iCalMsg As New CalendarMessage
Dim Config As New Configuration
Dim CalendarURL As String
Dim ItemURL As String
Dim NewList As String
NewList = "someone@" & DomainName & "," & "another@" & DomainName
CalendarURL = "file://./backofficestorage/" & DomainName & "/MBX/" & UserName & "/calendar/"
'Set the configuration fields
Config.Fields(cdoSendEmailAddress) = UserName & "@" & DomainName
Config.Fields.Update
iAppt.Configuration = Config
'Open the record set for the items in the calendar folder
Rec.Open CalendarURL
Set Rs.ActiveConnection = Rec.ActiveConnection
Rs.Source = "SELECT ""DAV:href"", ""urn:schemas:httpmail:subject"" " & _
"FROM scope('shallow traversal of """ & CalendarURL & """')" & _
"WHERE (""urn:schemas:httpmail:subject"" = 'Documentation Review Meeting')"
Rs.Open
'Enumerate the record set
Rs.MoveFirst
Do Until Rs.EOF
'Open the meeting in read/write mode
ItemURL = Rs.Fields(CdoDAV.cdoHref).Value
iAppt.DataSource.Open ItemURL, , adModeReadWrite
'Call the Invite method and pass the list of new attendees
Set iCalMsg = iAppt.Invite(NewList)
iCalMsg.Message.Send
'Save the meeting
iAppt.DataSource.Save
Rs.MoveNext
Loop