Check in code to see if application is open

K

Kristian

Can anyone tell me the easiest way to check if Word is
open on the computer? I have automation code (in Excel
and Access) that creates Word letters and faxes
automatically, but I don't want the code to start another
copy of Word if the application is already open.

Thanks for any tip!
Kristian
 
J

Jezebel

Dim pWordApp as Word.Application

on error resume next
Set pWordApp = GetObject("Word.Application")
on error goto 0

if pWordApp is nothing then
.... Word was not running
 
Top