Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect Word has been closed.
Message
From
23/03/2001 13:00:43
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00488111
Message ID:
00488123
Views:
10
Colin:

> I want to do 2 things here.
> 1. I don't want the user to be able to return to my app until they finish
> and close Word.

Be careful with this as the user may have Word open for something other than
to modify a document generated by your application and they find it rude
that you force them to close Word to go back to your app.

Are they editing a letter that you want to store in a record displayed on the
active form?

> 2. I need to know how to detect when Word is closed. I've discovered that
> the object reference remains even after closing Word.

The object reference remains (VARTYPE() returns 'O') but it is invalid.
Accessing any property or method or the RPC Server will raise an error 1426
that you can trap. Also, when a reference is invalid,
TYPE('loWord.AnyProperty') returns 'U'.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform