Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Allow user to modify a Word document?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01372571
Message ID:
01372594
Views:
49
>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.

*--- Here you want to Stop VFP
*---	
DO WHILE TYPE("WordObj.Name") == "C" .AND. NOT ISNULL(WordObj)
     DOEVENTS FORCE
ENDDO
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform