Export (0) Print
Expand All

GetInfoStore Method (Session Object)

Exchange Server 2003

Topic Last Modified: 2004-06-09

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

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

Optional. String. Specifies the unique identifier of the InfoStore object to retrieve. If storeID is an empty string or is not supplied, the default InfoStore for the session is returned.

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.

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
 
Show:
© 2014 Microsoft