Inbox Property (Session Object)
Inbox Property (Session Object)
The Inbox property returns a Folder object representing the current users 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:
- 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
Example
This code fragment uses the Session objects 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