Share via


StoreID Property (Folder Object)

StoreID Property (Folder Object)

The StoreID property returns the unique identifier of the InfoStore object in which the Folder object resides. Read-only.

Syntax

objFolder.StoreID

Data Type

String

Remarks

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 Programmer's Reference.

A Microsoft® Schedule+ calendar folder does not reside in a message store nor have a parent folder. If you obtain the default calendar folder by passing CdoDefaultFolderCalendar to the Session object's GetDefaultFolder method, the StoreID property has no defined value. An attempt to access StoreID in this case returns CdoE_NOT_FOUND.

The StoreID property corresponds to the MAPI property PR_STORE_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 Folder object and the property parameter of the RenderProperty method to CdoPR_STORE_ENTRYID.

Example

' from the sample function Folder_ID
    strFolderID = objFolder.ID
' from the sample function Folder_StoreID
    strFolderStoreID = objFolder.StoreID
' later: can use these IDs with Session.GetFolder()
' from the sample function Session_GetFolder
    Set objFolder = objSession.GetFolder(folderID:=strFolderID, _
                                      storeID:=strFolderStoreID)
 

See Also

Concepts

FolderID Property (Folder Object)
GetFolder Method (Session Object)
ID Property (Folder Object)
Folder Object