Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
You can update the properties and fields of an appointment or meeting that is saved in your calendar folder. For appointments, you overwrite the original appointment in the Web Store with the updated appointment. With meetings, you need to send the update to attendees in addition to saving the changes to the Web Store. If you are not the meeting organizer and you update a meeting in your calendar folder, any updates you accept from the meeting organizer overwrite your updates.
The basic process for updating appointments or meetings is as follows:
The following code example checks all of the appointments and meetings in the calendar of user12 on the Exchange 2000 Server exsvr3 in the exchange.microsoft.com domain. It changes any appointment or meeting scheduled in the "Flamingo Room" to the "Mount Rainier Room" and saves the appointment.
Dim CalendarURL As String Dim ItemURL As String Dim Rs As New ADODB.Recordset Dim Rec As New ADODB.Record Dim Conn As New ADODB.Connection Dim iAppt As New Appointment Dim Target As String Dim NewValue As String Dim Location As String Target = "Flamingo Room" NewValue = "Mount Rainier Room" 'Using the Exchange OLE DB provider CalendarURL = "file://./backofficestorage/gberg2.extest.microsoft.com/MBX/user12/calendar/" '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:calendar:location"" from scope('shallow traversal of """ & CalendarURL & """')" Rs.Open 'Enumerate the record set, checking each item's location Rs.MoveFirst Do Until Rs.EOF 'get the location of each item Location = Rs.Fields(CdoCalendar.cdoLocation).Value 'test for desired location If (Location = Target) Then 'open appointment in read/write mode and update the location property ItemURL = Rs.Fields(CdoDAV.cdoHref).Value iAppt.DataSource.Open ItemURL, , adModeReadWrite iAppt.Location = NewValue iAppt.DataSource.Save End If Rs.MoveNext Loop