MailSession Property

Applies To

Application Object.

Description

Returns the MAPI mail session number as a hexadecimal string (if there is an active session), or Null if there is no session. Read-only.

Remarks

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

This property is not used on PowerTalk mail systems.

See Also

MailLogoff Method, MailLogon Method, MailSystem Property, SendMail Method.

Example

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


If Not IsNull(Application.MailSession) Then Application.MailLogoff