Hi Stephen.
I can't use FindWindow to reliably tell if Word is already open. If it is, I would prefer to open multiple documents within the same Word instance (some users are running Office2000 and some OfficeXP).
Is there a way to determine if the WINWORD process is running from within VFP?As Andy says, you can use GETOBJECT() to open multiple documents in the same instance of Word. However, if Word is not running, this will cause an error. So you really need code like this:
TRY
oWord = GETOBJECT( , 'Word.Application' )
CATCH TO oErr
IF oErr.ErrorNo = 1426
oWord = CREATEOBJECT('Word.Application')
ELSE
THROW oErr
ENDIF
ENDTRY