Application.MailSession Method

Project Developer Reference

Returns the MAPI mail session number as a hexadecimal string if there is an active session, or returns Null if there is no session.

Syntax

expression.MailSession

expression   A variable that represents an Application object.

Return Value
String

Example
The following example gets the MAPI mail session number.

Visual Basic for Applications
  Sub Mail_Session()
Dim Return_MAPI As String
Return_MAPI = <strong class="bterm">MailSession</strong>()

End Sub

See Also