Hi,

I tried the following, and it worked pretty good:

Code:
Dim appObj As Object

On Error Resume Next
Set appObj = GetObject(, "Word.Application")
If Err Then
    MsgBox "Word is not running"
Else
    MsgBox "Word will be closed!"
    appObj.Quit
End If
Replace "Word.Application" with "Excel.Application" for MS Excel.

Roger