Calculate Form Fields

B

bw

I have never written code for MS Word.

I have a document which has three form fields, "labeled" Text1, Text2, and
Text3.
I'd like to see some code that performs some calculations on these fields.
For example, on exit from Text1, I'd like to multiple the value entered by
4.
I'd like to enter a default value when entering Text3, which is the Sum of
Text1 and Text.

I'd appreciate your help. Code sample to accomplish these tasks (if
possible) will get me started on how to begin coding on my own for Word.

Thanks,
Bernie
 
C

Charles Kenyon

To make it a default value (able to be changed) you'll need programming. To
simply calculate, though, all you need is a calculation field (= field) and
to check the property box on the fields supplying the variables to
"calculate on exit." What you are talking about is what Word calls an
"online form." Check this in help. For more about online forms, follow the
links at http://addbalance.com/word/wordwebresources.htm#Forms or
http://word.mvps.org/FAQs/Customization/FillinTheBlanks.htm especially Dian
Chapman's series of articles. You may also want to look at
http://www.word.mvps.org/FAQs/TblsFldsFms/LinesInForms.htm. For even more on
dealing with quirks of forms
http://word.mvps.org/FAQs/TablesFieldsForms.htm#Forms.

Hope this helps,
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
B

bw

Thank you both for the great input. I haven't been able to do what I wanted
yet, but may be able to take a shortcut with macropod's link. But I'm still
going to do the same thing later with a macro.
Again, Thanks,
Bernie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top