Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect Word has been closed.
Message
De
23/03/2001 13:00:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00488111
Message ID:
00488123
Vues:
11
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'.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform