Share via


GetAssociatedItem Method

GetAssociatedItem Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns an Appointment object that contains the appointment in the Exchange store that has the same globally unique identifier (GUID) as the appointment in the calendar part. If no appointment in the Exchange store has the same GUID as the calendar part, the method returns an error.

Applies To

ICalendarPart Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Function GetAssociatedItem
(
    [CalendarLocation As String],     [UserName As String],     [Password As String]
) As IAppointment

[C++]HRESULT GetAssociatedItem (     BSTR CalendarLocation,     BSTR UserName,     BSTR Password,     IAppointment** pVal );

Parameters

  • CalendarLocation
    The location of the calendar folder.
  • UserName
    A user who has read/write permission to the folder specified by the CalendarLocation parameter.
  • Password
    The user's password.
  • pVal
    Returned reference to an IAppointment Interface.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

For calendar folders in the mailbox store, the format of the CalendarLocation string is:

"file://./backofficestorage/<domain_name>/<mailbox_store>/<user_name>/calendar/"

This method does not return any information from the appointment in the calendar part.

If the calendar location is not specified in the method parameters, Collaboration Data Objects (CDO) uses the calendar location from the Configuration object. The following Visual Basic code sets the calendar location field in the Configuration object:

Dim Config As New Configuration Config.Fields("CalendarLocation") = "file://./backofficestorage/domain/MBX/user/calendar" Config.Fields.Update

Note  These examples use a file URL with the Microsoft ExchangeOLE DB (ExOLEDB) provider. The ExOLEDB provider also supports The HTTP: URL Scheme.

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.