Anyone have a way to supply the password to outlook
when the dialog pops up for name/domain/password? Outlook finds name and domain in registry but always prompts for
password even though already logged in to windows network.
rlp
Printable View
Anyone have a way to supply the password to outlook
when the dialog pops up for name/domain/password? Outlook finds name and domain in registry but always prompts for
password even though already logged in to windows network.
rlp
Sure!
Set objOutlApp = CreateObject("Outlook.Application")
If Err.Number = 0 Then
Set objNameSpace = objOutlApp.GetNamespace("MAPI")
If tfLogging = True Then
App.LogEvent "Mapi Object Status=" & Err.Number
End If
If Err = 0 Then
objNameSpace.Logoff
objNameSpace.Logon sProfile, sPassword, False, True
The key to the answer to your question is the "false" in the last line of the code. That line arguement determines whether a login dialog is displayed.