Skip to content

Latest commit

 

History

History
44 lines (25 loc) · 1.01 KB

Excel.Application.MailSession.md

File metadata and controls

44 lines (25 loc) · 1.01 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.MailSession property (Excel)
vbaxl10.chm133159
vbaxl10.chm133159
Excel.Application.MailSession
45dbbaa1-3da2-55f9-415b-ac9218d293dc
04/05/2019
medium

Application.MailSession property (Excel)

Returns the MAPI mail session number as a hexadecimal string (if there's an active session), or returns null if there's no session. Read-only Variant.

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.

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

[!includeSupport and feedback]