Outlook profile info is not accessable using the Outlook Object
Model, but using CDO it is possible (without incurring any security popups!).
VB Code:
Option Explicit 'Add a reference to Microsoft CDO 1.21 Type Library 'If you do not have it installed on your system you can install it 'from your Office CD. 'Also, Outlook needs to be running first!!! Private Function GetCurrentProfileName() As String Dim oSession As MAPI.Session Set oSession = CreateObject("MAPI.Session") oSession.Logon "", "", False, False GetCurrentProfileName = oSession.Name oSession.Logoff Set oSession = Nothing End Function Private Sub Form_Load() MsgBox "Current Outlook Profile = " & GetCurrentProfileName, vbOkOnly + vbInformation End Sub





Reply With Quote