IF Formulas in Word documents

T

thford

I have created a simple fill-in template in Word 2003 with check box form
fields and text fields. I would like to automatically fill in portions of
the next section of the template, based on the information in the first
section. For example: "If a particular check box foem field is checked, i
would want to copy the text from a realted text field to the second section
of the form. I havcen't been able to figure this out on my own. Any
suggestions?

Thanks
 
D

Doug Robbins - Word MVP

On exit from the checkbox formfield, run a macro that contains the following
code

With ActiveDocument
If .FormFields("bookmarknameassignedtocheckbox").Checkbox.Value = True
then
.FormFields("bookmarknameassignedtotargetformfield").Result =
..FormFields("Bookmarknameassignedtosourceformfield").Result
Else
.FormFields("bookmarknameassignedtotargetformfield").Result = "
"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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