Logon to Outlook from VB

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top