RootFolder Property (InfoStore Object)

RootFolder Property (InfoStore Object)

The RootFolder property returns a Folder object representing the root of the IPM subtree for the InfoStore object. Read-only.

Syntax

Set objFolder = objInfoStore.RootFolder

Data Type

Object (Folder)

Remarks

The RootFolder property provides a convenient way to get to this commonly used Folder object.

In addition to the general ability to navigate through the formal collection and object hierarchy, CDO supports properties that allow your application to directly access the most common Folder objects:

  • The InfoStore objects RootFolder property for the IPM subtree root folder
  • The Session objects Inbox property for the Inbox folder
  • The Session objects Outbox property for the Outbox folder

Some message stores also support a direct way to obtain the root folder of the message store. For more information, see the Session objects GetFolder method.

If your application is running as a Microsoft® Windows NT® service, you cannot access the Microsoft Exchange Public Folders through the normal hierarchy because of a notification conflict. You must use the InfoStores Fields property to obtain the Microsoft Exchange property PR_IPM_PUBLIC_FOLDERS_ENTRYID, property tag &H66310102. This represents the top-level public folder and allows you to access all other public folders through its Folders property.

Example

' from InfoStores_RootFolder
    If objInfoStore Is Nothing Then
        MsgBox "must first select an InfoStore object"
        Exit Function
    End If
    Set objFolder = objInfoStore.RootFolder
    If objFolder Is Nothing Then
        MsgBox "Unable to retrieve IPM root folder"
        Set objMessages = Nothing
        Exit Function
    End If
    If objFolder.Name = "" Then
        MsgBox "Folder set to folder with no name, ID = " _
                                                   & objFolder.ID
    Else
        MsgBox "Folder set to: " & objFolder.Name
    End If
    Set objMessages = objFolder.Messages
    Exit Function
 

See Also

Concepts

InfoStore Object