GetAssociatedAppointment Method (MeetingItem Object)

GetAssociatedAppointment Method (MeetingItem Object)

The GetAssociatedAppointment method returns an AppointmentItem object associated with this meeting.

Syntax

Set objAppoint = objMeeting.GetAssociatedAppointment( )

objAppoint

On successful return, contains the AppointmentItem object associated with this meeting.

objMeeting

Required. This MeetingItem object.

Remarks

When you receive a MeetingItem object representing a meeting request, you can call its GetAssociatedAppointment method to obtain an AppointmentItem object associated with the meeting request. This AppointmentItem is not the same object as the original AppointmentItem belonging to the meeting's Organizer, nor is it the same as an AppointmentItem obtained by any other recipient of the meeting request. Only the organizer can access the original AppointmentItem object.

The AppointmentItem as returned by GetAssociatedAppointment has the same property settings as the original, but you can change them as necessary. This does not affect any corresponding settings in the original AppointmentItem, or in any other recipient's associated AppointmentItem. Your AppointmentItem object is saved in your active calendar folder when you call its Update method.

If the meeting request is a meeting cancellation, that is, if its associated appointment's MeetingStatus property contains CdoMeetingCanceled, and you never received the original meeting request, GetAssociatedAppointment returns CdoE_NOT_FOUND. This behavior is compatible with Microsoft Schedule+ but not with Microsoft Outlook, which creates a tentative appointment in the calendar and brings up a form that asks the user to cancel this tentative appointment.

CDO automatically creates and saves an associated AppointmentItem for you if you call the MeetingItem object's Respond method with the RespondType parameter set to CdoResponseAccepted or CdoResponseTentative. Regardless of how the associated AppointmentItem is created, you are responsible for deleting it when you are finished with it, even if you subsequently decline the meeting request by calling Respond with RespondType set to CdoResponseDeclined.

If the meeting's organizer has sent an updated meeting request since you accepted the first request, CDO considers the existing AppointmentItem object in your calender folder to be out of date. When you call GetAssociatedAppointment, the existing appointment is deleted from your calendar folder, and GetAssociatedAppointment returns a new, updated AppointmentItem object. However, this new appointment is not stored in your calendar folder until you call its Update method.

You can work directly with the AppointmentItem object to access its specifications and respond to it. The appointment returned by GetAssociatedAppointment is the only AppointmentItem object on which you can call the Respond method.

Another messaging user can delegate you to receive messages on behalf of that user. This delegation cannot be done with CDO but is possible using MAPI. If you have been so delegated and receive a meeting request for that user, you can view the MeetingItem object in your Inbox, but you cannot accept the meeting request. Similarly, if you access the Inbox of a messaging user that has delegated reception to you, you can view meeting requests but not respond to them. In either of these cases, an attempt to call GetAssociatedAppointment or Respond returns CdoE_NO_SUPPORT.

Calendar folders are not supported in the public folders store provided with Microsoft® Exchange, and MeetingItem objects are stored as Message objects. An attempt to call GetAssociatedAppointment in this case returns CdoE_NO_SUPPORT.

See Also

Concepts

MeetingItem Object