in reply to Dealing with Popup-windows while connecting Outlook
If Outlook is not running when you create a NameSpace object variable, the user will be prompted for a profile if the user's mail services startup setting is set to Prompt for a profile to be used. Startup settings are on the Mail Services tab of the Options dialog box (Tools menu). You can use the NameSpace object's Logon method to specify a profile programmatically. Profiles are stored in the Windows registry under the \HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles subkey.
Here is the (untested) VB equivalent code of what you are trying to do:
Set myOlApp = CreateObject("Outlook.Application") Set myNameSpace = myOlApp.GetNameSpace("MAPI") myNameSpace.Logon "myProfile", "myPassword", True, True
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Dealing with Popup-windows while connecting Outlook
by banduwgs (Beadle) on Aug 18, 2003 at 14:00 UTC | |
by NetWallah (Canon) on Aug 19, 2003 at 20:14 UTC |