Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Allow user to modify a Word document?
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01372571
Message ID:
01372783
Vues:
49
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform