Link to home
Start Free TrialLog in
Avatar of kosenrufu
kosenrufu

asked on

How to modify this code so the profile is automatically selected?

Public Sub OutlookStart()
 
    On Error Resume Next
 
    Dim objOL       As Object
   
    'check if Outlook is running
    Set objOL = GetObject(, "Outlook.Application")
   
    'on error start Outlook
    If Err.Number <> 0 Then                                          '
        Err.Clear
        Shell "C:\Program Files\Microsoft Office\Office12\outlook.exe", vbMinimizedFocus
        DoEvents
    End If
 
    Set objOL = Nothing
 
End Sub


Currently I configured Outlook to prompt for profile. I want to automatically select the profile and bypass the prompt window. How can this be done with VBA?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Lambert Heenan
Lambert Heenan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial