Session Property (All CDO Library Objects)

The Session property returns the top-level Session object associated with the specified CDO Library object. Read-only.

Syntax

Set objSession = object.Session

Data Type

Object (Session)

Remarks

The Session object represents the highest level in the CDO Library object hierarchy. If you invoke the Session property of a Session object, it returns the same Session object.

The Session property does not correspond to a MAPI property and cannot be rendered into HTML hypertext by the CDO Rendering Library.

Example

' Function: Folder_Session 
' Purpose: Access the Folder's Session property and display its name 
' See documentation topic: Session property 
Function Folder_Session() 
Dim objSession2 As Session ' Session object to get the property 
' error handling here ... 
If objFolder Is Nothing Then 
    MsgBox "No active folder; please select Session->Inbox" 
    Exit Function 
End If 
Set objSession2 = objFolder.Session 
If objSession2 Is Nothing Then 
    MsgBox "Unable to access Session property" 
    Exit Function 
End If 
MsgBox "Folder's Session property's Name = " & objSession2.Name 
Set objSession2 = Nothing 
' error handling here ... 
End Function