CurrentUser Property (Session Object)
CurrentUser Property (Session Object)
The CurrentUser property returns the active user as an AddressEntry object. Read-only.
Syntax
Set objAddrEntry = objSession.CurrentUser
objAddrEntry
Object. The returned AddressEntry object that represents the messaging user logged on to the session.
objSession
Object. The Session object.
Data Type
Object (AddressEntry)
Remarks
The CurrentUser property returns Nothing when no user is logged on.
Example
This code fragment checks for logon, then displays the full messaging address of the current user:
If objSession Is Nothing Then
MsgBox ("Must log on first")
Exit Function
End If
Set objAddrEntry = objSession.CurrentUser
If objAddrEntry Is Nothing Then
MsgBox "Could not set the address entry object"
Exit Function
Else
MsgBox "Full address = " & objAddrEntry.Type & ":" _
& objAddrEntry.Address
End If