Inbox Property (Session Object)

The Inbox property returns a Folder object representing the current user's Inbox folder. Read-only.

Syntax

objSession.Inbox

Data Type

Object (Folder)

Remarks

The Inbox property returns Nothing if the current user does not have an Inbox folder.

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:

Example

This code fragment uses the Session object's Inbox property to initialize a Folder object:

' from the function Session_Inbox 
    ' make sure the Session object is valid ... 
    Set objFolder = objSession.Inbox 
    If objFolder Is Nothing Then 
        MsgBox "Failed to open Inbox" 
        Exit Function 
    End If 
    MsgBox "Inbox folder name = " & objFolder.Name 
    Set objMessages = objFolder.Messages 
    If objMessages Is Nothing Then 
        MsgBox "Failed to open folder's Messages collection" 
        Exit Function 
    End If