Logon to Outlook from VB

  • Thread starter Thread starter Werner Leupold
  • Start date Start date
W

Werner Leupold

Hi NG,
I try to access Outlook from VB6.
That works fine if Outlook is not password protected.
Whenever the outlook application is password protected it is not possible to
use the following code snipplet:

Dim oApp As New Outlook.Application
Dim oNS As Outlook.NameSpace
Set oApp = New Outlook.Application
Set oNS = oApp.GetNamespace("MAPI")

oNS.Logon "Outlook", "myPassword", False, True

Though the password is correct there will be a password dialog displayed and
I have to type in the password.
No matter if Outlook is running or not.

Thanks for helping

Werner
 
The logon is really only for Exchange mailbox logon and is pretty useless,
certainly for password protected PST files. There's nothing you can do about
that other than not using password protected PST files or being there to
logon manually.
 
Back
Top