When logging on to a CDO Session object and the user has another mail program running (like Outlook), if you don't know the name of the current user's mail profile, and you try to log in with this line
objMAPISession.Logon
the user is prompted for a profile name (even if they're already logged in and/or have a profile set as the default).
To prevent the prompt, you just specify False values for the Logon method's ShowDialog and NewSession parameters, like this:
objMAPISession.Logon , , False, False
0 comments
Hide comments