>>>can I open a worddoc so it is in a modal window?
>>>so my program waits until word gets closed??
>>>
>>>
>>>Thanks
>>>
>>>
>>>peter
>>
>>You can just initiate Word from VFP modal form and disallow its closing until Word is closed by, for example, checking if WordApplication object is still an object.
>
>cool. That might work
>I'll try it
>[UPDATE]
>the following does not work:
>
>Local oWord as word.application , cDoc as Character
>cDoc= ADDBS(SYS(5)+SYS(2003))+ALLTRIM(thisform.business.data.fpath)
>oWord=Createobject("word.application")
>oWord.documents.Open(cDoc)
>oWord.Visible=.t.
>SET ESCAPE ON
>DO WHILE VARTYPE(oWord)="O"
> _vfp.Visible=.F.
> ON ESCAPE exit
> WAIT WINDOW TIMEOUT 2 VARTYPE(oWord)
>ENDDO
>_vfp.Visible=.t.
>
>
>the type of oWord does not change after I exit word
>
>
>Peter
You should do it differently:
1. Link oWord to form property, i.e.
Thisform.oWordapp=Createobject("word.application")
2. Check VarType(Thisform.oWordapp) and IsNull(Thisform.oWordapp) in Form.QueryUnload to prevent closing.
Edward Pikman
Independent Consultant