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