Syntax

expression.MailSession

expression A variable that represents an Application object.

Remarks

This property applies only to mail sessions created by Microsoft Excel (it doesn't return a mail session number for Microsoft Mail).

This property isn't used on PowerTalk mail systems.

Example

This example closes the established mail session, if there is one.

Visual Basic for Applications
If Not IsNull(Application.MailSession) Then Application.MailLogoff
Access mail session ID? mail session Mail Session Property MailSession MailSession Property Retrieve mail session identifier established by Excel? Return MAPI mail session number?

See also: