Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.04 KB

Project.Application.MailLogoff.md

File metadata and controls

50 lines (32 loc) · 1.04 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.MailLogoff method (Project)
project-server
Project.Application.MailLogoff
e8634331-404c-6e01-4ce9-2dac8dcf364c
06/08/2017
medium

Application.MailLogoff method (Project)

Closes an established MAPI mail session.

Syntax

expression. MailLogoff

expression A variable that represents an Application object.

Return value

Nothing

Example

The following example checks for an existing mail session and logs off it. If not logged on, the following example logs on, downloads any new mail, and then logs off.

Sub LogoffFromMail() 
 
 If Not IsNull(MailSession) Then 
 MsgBox "Logging off mail session: " & MailSession 
 Application.MailLogoff 
 Else 
 MsgBox "Logging on to mail session now." 
 Application.MailLogon DownloadNewMail:=True 
 MsgBox "Logging off mail session: " & MailSession 
 Application.MailLogoff 
 End If 
 
End Sub

[!includeSupport and feedback]