Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check if MS Word is open
Message
From
05/08/2004 14:38:47
 
 
To
26/07/2004 10:45:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00927921
Message ID:
00931115
Views:
22
>I am writing an application that creates and emails Word docs from VFP. The documents are created in batches but need to be saved individually. After the documents are created and saved, I need to open them one at a time for the user to review and possibly change before they are emailed. I use oWord = CreateObject("Word.Application") to start Word. I don't want to open Word before each document is displayed, but if the user closes Word while they are reviewing the doc I have to have a way for the program to know that and reopen it.
>
>Is there a way to check if Word is open from my VFP7 app?
>

If your variable is oWord, something like this will do the trick:

IF VARTYPE(oWord)="O" AND NOT ISNULL(oWord)
* Word is open
ELSE
* Open it.
ENDIF

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform