View Single Post
  #2  
Old November 5th 08, 01:50 PM posted to microsoft.public.outlook.program_vba
Alan Moseley
external usenet poster
 
Posts: 61
Default Is there a way to get the profile name

You cannot do this from the Outlook Object Model, but if you download and
install CDO 1.21 you can use the following function:-

Public Function GetProfileName() As String
Dim MySession As MAPI.Session
Set MySession = CreateObject("MAPI.Session")
MySession.Logon "", "", False, False
GetCurrentProfileName = MySession.Name
MySession.Logoff
Set MySession = Nothing
End Function

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Salad" wrote:

Is there a way to determine what the profile name that is in use in an
Outlook session? If so, can you provide a small code snippet
demonstration it or tell me what method or property to use?


Ads