Platform SDK: Exchange 2000 Server

Publishing an Appointment

[This is preliminary documentation and subject to change.]

When you publish an appointment, the appointment is available to others without the need of a response from them. For example: You can publish your company’s holidays, charity drives, and up coming conferences.

You can save a published appointment to a public folder, a file, or you can send a published appointment by e-mail. Published appointments have no attendees.

To publish an appointment

  1. Create an Appointment object.
  2. Set the properties of the appointment.
  3. Create a Configuration object.
  4. Set the configuration fields and attach to the Appointment object.
  5. Create a Calendar Message object using the Publish method.
  6. Address and send the Calendar Message using the IMessage methods, or save the Appointment object using the IDataSource.SaveToContainer method.

In the following code example, an organizer publishes an appointment to the alias "team" and saves it to the public folder TeamCalendar.

Note   The public folder must already exist on the Exchange 2000 Server.

[Visual Basic]
Dim iAppt     As New Appointment
Dim iCalMsg   As CalendarMessage
Dim Config    As New Configuration
Dim FolderURL As String

FolderURL = "file://./backofficestorage/" & DomainName & "/public folders/TeamCalendar"

'Set the configuration fields
Config.Fields(cdoSendEmailAddress) = UserName & "@" & DomainName
Config.Fields.Update
Set iAppt.Configuration = Config

'Set the appointment properties
iAppt.StartTime = #10/14/1999 1:30:00 PM#
iAppt.EndTime = #10/14/1999 2:30:00 PM#
iAppt.Subject = "Pick up new specifications"
iAppt.Location = "Photocopy Room"
iAppt.TextBody = "Copies of the new specifications will be ready for pick up."

'Publish the appointment
Set iCalMsg = iAppt.Publish
iCalMsg.Message.To = "team@" & DomainName
iCalMsg.Message.Send

'Save the appointment to a public folder
iAppt.DataSource.SaveToContainer FolderURL