Check wether Outlook is opened - VBA

N

nike

Hi,
do you know a possibility to check wether OL is opened,
without opening it in the process of checking?
If it's closed I would like to keep it closed
and not open the dialog,
wheter the user wants to connect to the Exchangeserver...

I would like to check it from Excel.

Any tricks or tips are welcome ;-)

Bye

Nike
 
L

Lars Roland

You can see if the outlook mutex is held - this mutex is called
_outlook_mutex_ and is held by any version of outlook.
 
K

Ken Slovak - [MVP - Outlook]

Easiest way in VBA is to use GetObject:

Dim oOL As Outlook.Application

Set oOL = GetObject(, "Outlook.Application")
If oOL Is Nothing Then
'Outlook not opened
 
Top