FolderID Property (Message Object)

FolderID Property (Message Object)

The FolderID property returns the unique identifier of the folder in which the message resides. Read-only.



Data Type



Save the folder identifier to retrieve the Folder object at a later time using the Session objects GetFolder method.

MAPI assigns a permanent, unique identifier when an object is created. This identifier does not change from one MAPI session to another, nor from one messaging domain to another. However, MAPI does not require identifier values to be binary comparable. Accordingly, two identifiers can have different values, yet refer to the same object. In particular, one of them could be a short-term identifier and the other a long-term identifier; these are constructed using different formats.

MAPI compares identifiers with the CompareEntryIDs method, which takes into account the differences between identifier formats and returns True if the identifiers are assigned to the same object. CDO provides the CompareIDs method in the Session object, which furnishes the same functionality. For more information on entry identifiers, see the MAPI Programmers Reference.

The FolderID property is not exposed on AppointmentItem objects created by Microsoft® Schedule+, and it is not automatically set when you create an appointment within a CDO application until you call the Update method. In these cases, the application must assign a value to FolderID or an attempt to read it returns CdoE_NOT_FOUND.

The FolderID property corresponds to the MAPI property PR_PARENT_ENTRYID, converted to a string of hexadecimal characters. It can be rendered into HTML hypertext using the CDO Rendering ObjectRenderer object. To specify this, set the object renderer's DataSource property to this Message object and the property parameter of the RenderProperty method to CdoPR_PARENT_ENTRYID.

See Also


Message Object