Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Automation Question
Message
De
28/04/1999 07:41:31
 
 
À
27/04/1999 23:30:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00212770
Message ID:
00212900
Vues:
29
Erik,

Thanks for reply - but in regard to #2 ... try ...

oWord = Create("Word.Application")
oWord.visible = .T.
oWord.Activate
? !IsNull(oWord) && returns .T. as expected

Now - go to Word and close it

? !IsNull(oWord) && still returns .T. - but errors any time you try to reference a property ie "oWord.name" and word is obviously, not "up".

Am I missing something?
Thanks,
Ken



>>1) Is there a way for my VFP word application object to respond to Word events? In particular a "Save", closing a document, and quitting Word? Would the new VFP COM object thing with its BindEvents() help?
>>
>
>Boy are you in luck. The Word.Application object exposes exactly 2 events tat you can bind to a VFP object using the VFPCOM dll. ChangeDocument and Quit. Sounds like the 2 you need.
>
>
>>2) Short of the above - I've noticed that when I create a word app object via loWord = Create("Word.Application"), and the user subsequently quits word, my object is still "an object" but trying to reference it gives an error. Is there any way short of some kludgy error trapping here to determine whether my "word object" is still up and running?
>>
>
>is
>
>IF !ISNULL(oWord) kludgy?
Ken B. Matson
GCom2 Solutions
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform