GetInfoStore Method (Session Object)

The GetInfoStore method returns an InfoStore object that can be used to navigate through both public folders and the user's personal folders.

Syntax

Set objInfoStore = objSession.GetInfoStore(storeID)

objInfoStore
On successful return, contains the InfoStore object with the specified identifier. When the InfoStore object does not exist, GetInfoStore returns Nothing.
objSession
Required. The Session object.
storeID
Required. String. Specifies the unique identifier of the InfoStore object to retrieve.

Remarks

The GetInfoStore method allows you to obtain any message store for which you know the ID property. Within the message store you can then obtain any child Folder object for which you know the ID property.

Example

This code fragment uses the GetInfoStore method to obtain a specific message store:

' from the function Session_GetInfoStore 
' requires a global variable that contains the InfoStore ID 
Dim strInfoStoreID as String ' ID as hex string 
Dim objInfoStore As InfoStore 
    If strInfoStoreID = "" Then 
        MsgBox ("Must first set string variable to InfoStore ID") 
        Exit Function 
    End If 
    Set objInfoStore = objSession.GetInfoStore( _ 
                                  storeID:=strInfoStoreID) 
    ' error handling ... 
    MsgBox "InfoStore set to " & objInfoStore.Name