Platform SDK: Exchange 2000 Server

Adding an Appointment to the Calendar

[This is preliminary documentation and subject to change.]

The calendar is a folder in the private Web Store. You can add appointments to your calendar folder. You can also save appointments to a public folder.

To add an appointment to the calendar

  1. Create an Appointment object.
  2. Set the properties of the appointment. A StartTime and either an EndTime or a Duration are required.
  3. Save the appointment to the calendar folder using the IDataSource interface.

The following code example shows you how to save an appointment to the calendar of a specific user.

[Visual Basic]
Dim CalendarURL As String
Dim iAppt       As New Appointment

CalendarURL = "file://./backofficestorage/" & DomainName & "/MBX/" & UserName & "/calendar/"

'Set the appointment properties
iAppt.StartTime = #10/14/1999 1:30:00 PM#
iAppt.EndTime = #10/14/1999 2:30:00 PM#
iAppt.Subject = "Dentist appointment"
iAppt.Location = "617 Main St."
iAppt.TextBody = "Annual check up with Dr. Jones"

'Save the appointment
iAppt.DataSource.SaveToContainer CalendarURL

Note   You need to specify the location of the calendar folder when you save an appointment to the Web Store.

CDO connects to the Web Store using the Exchange 2000 Server OLE DB provider using the following URL syntax.

file://./backofficestorage/domain/web_store/user/calendar/
domain
The fully-qualified domain name of the Exchange 2000 Server.
web_store
The name of the Web Store. The default private Web Store name is "MBX."
user
The Exchange user name of the calendar owner.