>I want to pause my VFP application long enough for a user to modify a document that has been created using Word automation and then regain control of Word so that automation can handle printing and/or saving of the document and restoration of any settings that may have been changed by automation or the user. Is this possible and practical? What is the best way to do this?
I cant recall who posted the code, but i have been using the following DO WHILE routine to wait until the user closes the MSWord session.
WordObj.visible = .t.
DO WHILE TYPE("WordObj.Name") == "C" .AND. NOT ISNULL(WordObj)
DOEVENTS FORCE
ENDDO