Application.MailSession method (Project)
Returns the MAPI mail session number as a hexadecimal string if there is an active session, or returns Null if there is no session.
expression A variable that represents an Application object.
The following example gets the MAPI mail session number.
Sub Mail_Session() Dim Return_MAPI As String Return_MAPI = MailSession() End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.