Logon Method
Applies To
NameSpace object.
Description
Logs the user on to MAPI, obtaining a MAPI session.
Syntax
expression.Logon(Profile, Password, ShowDialog, NewSession)
expression An expression that returns a NameSpace object.
Profile Optional String. The profile name to use for the session.
Password Optional String. The password (if any) associated with the profile.
ShowDialog Optional Boolean. True to display the MAPI logon dialog.
NewSession Optional Boolean. True to create a new session (doesn't use an existing session).
See Also
Logoff method.
Example
This example logs on to a new session, displaying the dialog box to verify the profile name and password.
Set olNameSpace = myOlApp.GetNameSpace("MAPI")
olNameSpace.Logon "myProfile", "myPassword", True, True