_NameSpace.Logon Method
Logs the user on to MAPI, obtaining a MAPI session.
Namespace: Microsoft.Office.Interop.Outlook
Assembly: Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)
Syntax
'Declaration
Sub Logon ( _
Profile As Object, _
Password As Object, _
ShowDialog As Object, _
NewSession As Object _
)
'Usage
Dim instance As _NameSpace
Dim Profile As Object
Dim Password As Object
Dim ShowDialog As Object
Dim NewSession As Object
instance.Logon(Profile, Password, ShowDialog, _
NewSession)
void Logon(
Object Profile,
Object Password,
Object ShowDialog,
Object NewSession
)
Parameters
- Profile
Type: System.Object
The MAPI profile name, as a String (string in C#), to use for the session.
- Password
Type: System.Object
The password (if any), as a String (string in C#), associated with the profile. This parameter exists only for backwards compatibility and for security reasons, it is not recommended for use. Microsoft Oultook will prompt the user to specify a password in most system configurations. This is your logon password and should not be confused with PST passwords.
- ShowDialog
Type: System.Object
True to display the MAPI logon dialog box to allow the user to select a MAPI profile.
- NewSession
Type: System.Object
True to create a new Outlook session. Since multiple sessions cannot be created in Outlook, this parameter should be specified as True only if a session does not already exist.