Platform SDK: Exchange 2000 Server

CalendarMessage CoClass

[This is preliminary documentation and subject to change.]

Use to send and respond to meeting requests.

CLSID
CD000102-8BD5-11D1-82DB-00C04FB1625D
ProgID
CDO.CalendarMessage
Type Library
Microsoft CDO for Microsoft Exchange Library
Inproc Server
CDOEX.DLL
Threading Model
Both

Implemented Interfaces

IBodyPart

ICalendarMessage

IDataSource

IMessage

OLE DB Row Access

Supported IDataSource Bindings

IDataSource method Target argument Content class
Open Web Store item URL urn:content-classes:calendarmessage
OpenObject IRow
_Record
IStream
_Stream
IBodyPart
urn:content-classes:calendarmessage
SaveTo Web Store item URL N/A
SaveToContainer Web Store folder URL N/A
SaveToObject IRow
_Record
IStream
_Stream
IBodyPart
N/A

Remarks

Because meeting requests are sent and received as messages with MIME body parts containing calendar content, this class accesses full messaging functionality with the IMessage, IBodyPart, and IDataSource interfaces.

The IBodyPart interface acts as the root of the hierarchy of MIME body parts in a message.

The CalendarMessage object encapsulates the meeting request as an e-mail message. It also provides access to the ICalendarParts interface that filters for body parts containing calendar content.

Request/Response Protocol

The CalendarMessage object serves the protocol requirements for the organizer, who sends a meeting request, and an attendee, who sends a meeting response. The following steps outline a typical scenario:

  1. The organizer creates an Appointment object, populated with the necessary property values such as the meeting location and times. The organizer adds Attendee objects to the Attendees collection.
  2. The Appointment object's CreateRequest method creates a CalendarMessage object that is sent with the Send method.
  3. An attendee receives a meeting request in a message containing at least one body part of calendar content. The CalendarMessage object's CalendarParts property accesses an ICalendarParts collection, and its GetUpdatedItem method instantiates an Appointment object with the meeting times, location, and other values from a calendar part in the meeting request message. That Appointment object is saved in the attendee's calendar folder.
  4. An attendee can respond by accepting, accepting tentatively, or declining the meeting request. To respond, the attendee creates a CalendarMessage object using the Appointment object's Accept, AcceptTentative , and Decline methods and sends a response message to the organizer with an optional text message. An attendee can also invite another person to the meeting using a CalendarMessage object.
  5. The organizer receives the response message and derives an Appointment object using the ICalendarParts collection and GetUpdatedItem method. The Attendee collection can be examined to determine the attendees who accepted or declined, and the organizer can discard the response Appointment object.

Example

In the following code example, user12@exchange.microsoft.com creates a meeting request and sends it to someone@microsoft.com.

[Visual Basic]
Dim iAppt     As New Appointment
Dim iCalMsg   As     CalendarMessage
Dim Config    As New Configuration
Dim iAttendee As New Attendee

'Set the configuration fields
Config.Fields(cdoSendEmailAddress) = "user12@exchange.microsoft.com"
Config.Fields("CalendarLocation") = "file://./backofficestorage/exchange.microsoft.com/MBX/user12/calendar"
Config.Fields.Update
iAppt.Configuration = Config

'Set the appointment properties
iAppt.StartTime = #9/5/1999 12:30:00 PM#
iAppt.EndTime = #9/5/1999 1:30:00 PM#
iAppt.Subject = "Lunch meeting"
iAppt.Location = "Building B Cafeteria"

'Add an attendee
Set iAttendee = iAppt.Attendees.Add
iAttendee.Address = "someone@microsoft.com"

'Create the calendar message and send it
Set iCalMsg = iAppt.CreateRequest
iCalMsg.Message.Send