Code to find out if another program is running

LadyDi

Registered User.
Local time
Today, 02:33
Joined
Mar 29, 2007
Messages
894
I found code at this website that is supposed to determine if a specific program is running on your computer. I have a couple questions about the code here. One, when I run it just the way it is and call it in the immediate window with the ?fIsAppRunning("word") command, it tells me "True" whether I have Microsoft Word open or not. Which tells me that something isn't working quite right. However, I don't know what's wrong, much less how to correct it.

My other question is this: After the code is working properly, how can I add new programs to it? There are two programs the end user might need open to complete a process. One is called Extra and one is called tn3270 (this is how they show up in the Processes tab of the Task Manager). I think in order to add them to this code, I need to know a "class" to associate with them. However, I don't have the faintest idea how to figure that out.

Any advice you can provide would be greatly appreciated.
 
The fact there are two cases for powerpoint (95 and 97) indicates to me this is very old code and has not been updated for current versions of word, excel etc.

As to how to add new programs I would suggest you need to modify the case statement but I have absolutely no idea where you would find the equivalent of OpusApp, XLMain etc
 

Users who are viewing this thread

Back
Top Bottom