VBA basics - Logging into Outlook

B

Brian Bristol

Hello,

I am trying to use the automation object model to Launch Outlook,logo
as a specific user and display the inbox. This is what I have so fa
but there is a "connect" dialog that connects to the exchange serve
that requires a password. I can not seem to get past it.. Any idea
out there?

Private Sub Command1_Click()
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNameSpace("MAPI")
myNameSpace.Logon "profile", "password" , True, True
Set myFolder = myNameSpace.GetDefaultFolder(6)
myFolder.Display
myNameSpace.Logoff
End Su
 

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