Avatar of gfcnetwork
gfcnetworkFlag for United States of America asked on

Form fields to equal each other

In Microsoft Word 2003, in a form is there a way to have 2 bookmarked fields equal each other so that if text is typed into one field, the same text is filled in on the other field?
Microsoft Word

Avatar of undefined
Last Comment
gfcnetwork

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Nerdwood

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
wobbled

You just need to enter a small bit of code eg

Sub MatchField()

ActiveDocument.Fields("Text2").Result = ActiveDocument.Fields("Text1").Result

End sub

Set this macro to trigger on exit of the first field.  Text1 and Text2 are just the names of the fields, right click on them and select properties.  Just change the code to match what is showing as their name and to set the exit macro

GrahamSkan

You can use a Ref field ( Insert/Field) instead of the second Form field. If you definitely need it to be Form Field, it would be better to use VBA.

Sub MyMacro1()
ActiveDocument.FormFields("Text2").Result = ActiveDocument.FormFields("Text1").Result
End if


Write the macro and set it to be the Exit macro for the first field. If you want the same thing to happen the other way around, write another macro and make in the Exit macro for the second field.
ASKER
gfcnetwork

Nerdwood - we are trying to use your approach as the user is familiar at all with programming, but with the cross reference, she types in the bookmark 1 location and instead of filling in the same text for both bookmark1 and bookmark 2, the text only shows up in the bookmark 2 location. Any advice?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes