>I have a VFP 7 application that uses OLE automation to export one or more reports to MS Word. The user has the option to open Word to review and edit the exported document(s). Right now I open each exported document in a separate instance of MS Word. The oWord object has already been released in code. Because the document(s) names change, 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?
>
>Stephen
Stephen,
You could check it out with GetObject(). However it's not suggested and dangerous (search Word and GetObject to see a detailed discussion on why dangerous).
Continue to create it CreateObject(). Depending on OS version even with GetObject you might see as if it was separate instances (but not, Word is weird, it has only one PID in task process list, though application list might show multiple - Excel doesn't behave that way).
Cetin