Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
Attendees, who want to remove themselves from a meeting, can open the meeting in their calendar folder, and send a decline response message to the organizer. The meeting remains in the attendee's calendar with a status of declined, unless the attendees delete the meeting from their calendar folders.
If you want to remove the meeting from your calendar without notifying the organizer, delete the meeting as shown in Canceling an Appointment.
Note It is a good idea to verify that you are not the organizer of a meeting before trying to decline a meeting.
The basic process for declining a previously accepted meeting is as follows:
The following code example gets all of the meetings in the calendar of a specific user with the subject "Documentation Review Meeting." It verifies that the user is not the organizer, sends the decline message, and then deletes the meeting from the calendar folder.
Dim CalendarURL As String Dim ItemURL As String Dim Rs As New ADODB.Recordset Dim Rec As New ADODB.Record Dim iAppt As New Appointment Dim Config As New Configuration Dim iAtnds As CDO.IAttendees Dim iCalMsg As CDO.CalendarMessage Dim Address As String Dim Index As Integer CalendarURL = "file://./backofficestorage/" & DomainName & "/MBX/" & UserName & "/calendar/" 'Set the configuration fields Config.Fields(cdoSendEmailAddress) = UserName & "@" & DomainName Config.Fields.Update iAppt.Configuration = Config 'Set the address of the user for comparing with the attendee value Address = "MAILTO:" & UserName & "@" & DomainName 'Open a 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 , , adOpenStatic, adLockOptimistic 'Enumerate the record set Rs.MoveFirst Do Until Rs.EOF 'Open each meeting ItemURL = Rs.Fields(CdoDAV.cdoHref).Value iAppt.DataSource.Open ItemURL, , adModeReadWrite Set iAtnds = iAppt.Attendees 'Find this attendee and check IsOrganizer For Index = 1 To iAtnds.Count If Not (iAtnds.Item(Index).IsOrganizer) And iAtnds.Item(Index).Address = Address Then 'Create a response message and send it to the organizer Set iCalMsg = iAppt.Decline iCalMsg.Message.TextBody = "Sorry, I cannot attend this meeting." iCalMsg.Message.Send 'Delete the appointment from the calendar folder (optional) Rs.Delete Exit For 'Stop checking attendees End If 'User is not the organizer Next Index Rs.MoveNext Loop