Platform SDK: CDO 1.2.1 |
The Inbox property returns a Folder object representing the current user’s Inbox folder. Read-only.
objSession.Inbox
Object (Folder)
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:
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