The Session property returns the top-level Session object associated with the specified CDO for NTS Library object. Read-only.
Set objSession = object.Session
Object (Session)
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.
' 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