Share via


Appointment CoClass

Topic Last Modified: 2006-06-13

Defines appointments, and provides methods and properties for sending, responding to, and managing them.

CLSID

CD000100-8B95-11D1-82DB-00C04FB1625D

ProgID

CDO.Appointment

Type Library

Microsoft CDO for Exchange 2000 Library

Inproc Server

CDOEX.DLL

Threading Model

Both

Implemented Interfaces

IAppointment Interface

IBodyPart Interface

IDataSource Interface

OLE DB Row Access

Supported Bindings

The following table lists IDataSource interface bindings.

Method Target Argument Content Class

Open

Exchange store item URL

urn:content-classes:appointment

OpenObject

IRow _Record IStream _Stream IBodyPart

urn:content-classes:appointment

SaveTo

Exchange store item URL

N/A

SaveToContainer

Exchange store folder URL

N/A

SaveToObject

IRow _Record IStream _Stream IBodyPart

N/A

Remarks

The IAppointment interface is used for creating appointments and for sending and responding to meeting requests. It contains methods that create a CalendarMessage CoClass object for encapsulating meeting requests and responses as a message. The CalendarMessage object provides access to the IMessage interface for Send and other methods. It also provides access to the ICalendarParts interface, which filters a message for body parts containing calendar content.

The IDataSource interface facilitates opening data from and saving data to other objects. The IBodyPart interface acts as the root of the hierarchy of Multipurpose Internet Mail Extensions (MIME) body parts in the message.

You can also use the Appointment object's GetNextInstance and GetFirstInstance methods to examine a recurring appointment. Use the Publish method to send an announcement of the meeting to recipients who need not respond.

Example


Function CreateAndSendMeeting(iMbx As CDO.IMailbox) As CDO.Appointment
  Dim iAppt      As New Appointment
  Dim Config     As New Configuration
  Dim iCalMsg    As CalendarMessage
  Dim iAttn1     As Attendee
  Dim iMsg       As CDO.Message


  ' Set the configuration fields.
  Config.Fields("CalendarLocation") = iMbx.Calendar
  Config.Fields(cdoSendEmailAddress) = "meetingorganizer@example.com"
  Config.Fields.Update


  With iAppt
    Set .Configuration = Config

    ' Set the appointment properties.
    .StartTime = #8/20/1999 10:00:00 AM#
    .EndTime = #8/20/1999 11:30:00 AM#
    .Subject = "Department meeting"
    .Location = "Executive Conference Room"

    ' Add a required attendee.
    Set iAttn = .Attendees.Add
    iAttn.Address = "MAILTO:someone@example.com"
    iAttn.Role = cdoRequiredParticipant

    ' Add an optional attendee.
    Set iAttn = .Attendees.Add
    iAttn.Address = "MAILTO:another@example.com"
    iAttn.Role = cdoOptionalParticipant

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

    ' Save the meeting to the calendar of the organizer.
    .Datasource.SaveToContainer iMbx.Calendar

   End With


   Set CreateAndSendMeeting = iAppt

End Function