Platform SDK: CDO 1.2.1

Session Property (All CDONTS Library Objects)

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

Syntax

Set objSession = object.Session 
 

Data Type

Object (Session)

Remarks

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

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 folder supplied; 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