_Application.MailLogon(Object, Object, Object) Method

Definition

Logs in to MAPI Mail or Microsoft Exchange and establishes a mail session. If Microsoft Mail isn't already running, you must use this method to establish a mail session before mail or document routing functions can be used.

public void MailLogon (object Name, object Password, object DownloadNewMail);
Public Sub MailLogon (Optional Name As Object, Optional Password As Object, Optional DownloadNewMail As Object)

Parameters

Name
Object

Optional Object. The mail account name or Microsoft Exchange profile name. If this argument is omitted, the default mail account name is used.

Password
Object

Optional Object. The mail account password. This argument is ignored in Microsoft Exchange.

DownloadNewMail
Object

Optional Object. True to download new mail immediately.

Remarks

Microsoft Excel logs off any mail sessions it previously established before attempting to establish the new session.

To piggyback on the system default mail session, omit both the name and password parameters.

Applies to