ChenChen
asked on
Detect if outlook is running.
Hi,
I want to use vb code to detect if my outlook is running or not. Is there a simple way?
I want to use vb code to detect if my outlook is running or not. Is there a simple way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks mindless idiot. It works fine after I altered "Outlook Express" to "Microsoft Outlook".
TNC0292, I couldn't get yours working, don't know why.
TNC0292, I couldn't get yours working, don't know why.
How would I use this code in the On_Click event of another button...without the fields and the command button you talk about in your solution?
set wmi = getobject("winmgmts:")
sQuery = "select * from win32_process where name='outlook.exe'"
set processes = wmi.execquery(sQuery)
isOutlookRunning = (processes.count > 0)