>Hello:
>
>I am in the middle of a project and I call a MSWord document through the VFP using the way of Automation command. The problem is I need to know when a document remain opened while I execute other commands. Is there a way to know when a document is opened. I open many document but so I can't just close the application (Word Application).
>
>Thanks
>
>Efrain
?type(oWord.ActiveDocument)==[O]
oldOnError=on('error')
on Error oWord=.NULL.
oWord=getobject(,'Word.Application')
on error &oldOnError
if isnull(oWord)
Endif
Imagination is more important than knowledge