Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing VBA code for a Word doc from VFP
Message
 
To
04/07/2000 14:31:34
Kevin Goh
Cole & Company Limited
Victoria, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00388120
Message ID:
00388134
Views:
11
In VB for Word, I use

editselectall
lockFields/unlockdfields
updateFields

Can't you do this? Because of various virii, you may find your scripts disabled if attached to a button.

>I am currently generating an MS Word doc from VFP which contains a Word 'table'. The last row of the table has a field with a formula that sums the values of the fields in that column. The problem is that Word does not automatically update the total when a number is changed. It only updates when you select the total field and press F9, or when you print the doc, if the Update Fields option is checked.
>If the user changes a number and does not do the F9, the total displayed is incorrect.
>
>One solution I'm considering is to drop a button on the doc so that the user can be reminded that an update has to be done before the correct total will be displayed, and also to update the total when clicked. I can programatically drop a button on the doc, but how can I programatically write code for it's click event?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform