![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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? |
#3
|
|||
|
|||
![]()
The CDO download is only for Outlook 2007, where there is already a
NameSpace.CurrentProfileName property available. CDO 1.21 for earlier versions of Outlook is located on the Office CD. Also, if the code is to be managed code CDO is not supported for use in managed code. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Alan Moseley" wrote in message ... 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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I set up a new profile? | Shauna | Outlook - Installation | 6 | March 30th 07 06:34 PM |
How do I set up a new profile | High Desert | Outlook - Using Contacts | 5 | March 30th 07 06:31 PM |
More than one OL profile under one Windows profile in OL 2K | Storfille | Outlook - Installation | 2 | March 19th 07 10:39 AM |
what is a profile | Anjali | Outlook - General Queries | 1 | August 8th 06 07:26 PM |
Profile | profile | Outlook Express | 1 | March 25th 06 03:34 AM |