Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Allow user to modify a Word document?
Message
From
12/01/2009 10:06:54
 
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:
01372783
Views:
43
>That's only part of the problem. The user should not create new documents, Print, Save or Save As either. I can take away most of the toolbar but the problem really seems to be how to regain control of Word before Word is closed. I can pop up interesting (irritating?) messages from the various Word events but have thusfar been unsuccessful in wrestling control back to VFP.

One idea that comes to mind is to use the windows messages that Word generates when the user tries to print, save or close word. In most cases the user should receive a message like "Do you want to save the changes..." or the "Print" dialog.

You could check in short intervals the existence of such windows, and then when you identity a window you could programmatically "press" the cancel button from VFP (or send an ESCAPE), so the user does not get a chance to confirm the dialogs. It seems to be clumsy, but the only idea until now that comes into my mind.
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform