Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to tell if Microsoft Outlook is running?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00680980
Message ID:
00681106
Views:
16
If WSH is not available, try the following:
LOCAL o, lcOldErr, llError
lcOldErr = on('error')
on error llError = .t.
o = GETOBJECT(,'outlook.application')
on error &lcOldErr
IF VARTYPE(o) = "O"
   *!* Outlook is running. Do what you want
ELSE
   DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
       INTEGER hwnd, ;
       STRING lpVerb, ;
       STRING lpFile, ;
       STRING lpParameters, ;
       STRING lpDirectory, ;
       LONG nShowCmd

   lnRetVal=Shellexecute(0,"Open","outlook","","",1)

   ? lnRetVal
   CLEAR DLLS
ENDIF
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform