Name of the current profile

T

Tom Winter

How can I determine the name of the currently logged on profile using the
Outlook object model (2000 or later) and/or CDO? Thanks!
 
T

Tom Winter

Thanks, I knew it had to be easy. Is there any way to do this with the
Outlook object model (WITHOUT CDO), or can I use CDO with Outlook to get the
name of the profile the user is CURRENTLY logged on with (I don't want to
start another session.) Thanks for the help!
 
K

Ken Slovak - [MVP - Outlook]

Outlook.Application.Session only returns "MAPI" so you'd have to use CDO for
this. If you use a piggy-back logon to CDO you would get the currently
running profile name.

oCDO.Logon "", "", False, False

Of course Outlook has to be running to use a logon like that.
 
T

Tom Winter

If Outlook is currently running and I do oCDO.Logon as you said, no UI
should pop-up in front of the user, correct?

Thanks for your help!

--
Tom Winter
[email protected]
www.AmosFiveSix.com
Ken Slovak - said:
Outlook.Application.Session only returns "MAPI" so you'd have to use CDO for
this. If you use a piggy-back logon to CDO you would get the currently
running profile name.

oCDO.Logon "", "", False, False

Of course Outlook has to be running to use a logon like that.
 
K

Ken Slovak - [MVP - Outlook]

Correct, that login will use an existing Outlook session with no logon
dialog shown.
 
Top