Automating Templates in MS Word 2010

I've got a couple of fairly long documents that all need the same sort of automation.

These documents all have state specific information, and I'd like to automate as much as possible. Here's what I mean:

I'd like to be able select the state the document is being prepared for (in this case, let's use New Jersey). There are instances in the document where I'd like a field to automatically populate with the words "New Jersey". There are other parts of the document where I'd like it to automatically populate with "NJ". Additionally, there are other parts of the document where I would like it to populate information, such as "NJDED", "New Jersey Department of Education", or "NJDED - 877-900-6960".

I make these documents for several states, and I'd really like an option when I begin working, to select a state, or something along those lines, and the rest of the information would automatically fill itself in.

Is this even possible? I'm at a total loss on how to go about this. I'm extremely proficient in using word and have a decent understanding of programming, so I'm up for the challenge no matter what.
Look into having a legacy form field drop down list for your states. I would suggest populating it with the two-letter state codes. Then you would use those codes for your state-specific information and coding using IF fields to test for the results of the drop-down. The dropdown field must have the property of calculate on exit checked.

Once it is finished, you protect it for forms.

Making Forms with Microsoft Word
Using Fields in Microsoft Word

Fields are under Insert > Quick Parts > Fields
If your fields typed instead of inserted, you must use Ctrl-F9 to insert the field braces { }. They cannot be typed from the keyboard.

The dropdown is on the legacy form fields part of the Developer Tab. Do not use the ActiveX control.

Volunteering to "pay forward" the help I've received in the Microsoft user community.

Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I agree with Charles suggestion.  What you want to do is setup a form with some simple programming.  At the start of the form you have a non-printing drop-down to pick the state and that selection is used to control the display of data throughout the document/form.

Here are some more articles on the subject:

http://www.sharepointjohn.com/using-content-controls-to-repeat-form-fields-in-microsoft-word-2007-and-word-2010/

Apr 9, 2010                          John Chapman

When creating Microsoft Word-based forms there may be a need to have a form field repeated throughout the whole document. For instance, with a company name, you may want this information repeated automatically throughout the document rather than manually entering the company name into every place it is needed. This helps greatly to ensure fewer errors and improves efficiency when users fill out the form.


Repeating Data or Populating Multiple Fields

http://gregmaxey.mvps.org/word_tip_pages/repeating_data.html

This Microsoft Word Tips & Microsoft Word Help page offers several solutions to the question, "How do I enter data in one place in a document and have it automatically repeated in other places?"   My intention is not to reinvent the wheel, so after a brief introduction I will simply send you on to existing web articles containing full explanations of some of the more comprehensive methods.   See paragraph 7 if you want to go directly to information about the exciting new Content Controls in Word2007.



Formfield Userform Listbox

http://gregmaxey.mvps.org/word_tip_pages/formfield_userform_listbox.html

This Microsoft Word Tips & Microsoft Word Help page will show you how to use a Userform to overcome the 25 item limit in legacy online (protected) form field dropdown list fields. The limitation in Word forms caused by this constraint is fully illustrated in my Linked Dropdown Fields. The method shown here is an adaptation of the basic method shown in Microsoft KB Article 19856.


Interactive Userform

http://gregmaxey.mvps.org/word_tip_pages/interactive_userforms.html

This Microsoft Word Tips & Microsoft Word Help page supplements Create and Employ a Userform. Here I will show you several methods for displaying userform data in your document and for making information in your document interactive with the controls (i.e., text fields, list boxes, etc.) on the userform.


Please Fill Out This Form (5 Part Series)
Part 1: Create professional looking forms in Word

http://www.computorcompanion.com/LPMArticle.asp?ID=22

by Dian D. Chapman

Have you ever been asked to fill out a form in a word processor, only to discover that when you attempted to enter information, the lines on the form moved all over the page? Not to mention that the form was difficult and time-consuming to fill out? Most people don't realize that you can easily create professional-looking forms in Word.




.
*****
.
As computer scientists we are trained to communicate with the dumbest things in the world – computers –
so you’d think we’d be able to communicate quite well with people.
Prof. Doug Fisher

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

You may be able to work this out for yourself from the information already provided esp. the link to http://gregmaxey.mvps.org/word_tip_pages/repeating_data.html which covers all bases, but how to approach this will depend on the nature of the rest of the document. You can only fill in the state data in its various forms if the bulk of the document is fixed, or if you are creating the document from pre-prepared texts. If you are simply typing the documents then there is no benefit to be gained from the automation you describe.

My personal preference would be to create a simple userform with a combobox containing all the states you require, and whatever other input devices you require to collect all the variable information and then write the values (or derived values) to the document along with any associated text, using bookmarks or docvariables to place the text.
Graham Mayor (Microsoft Word MVP 2002-2019)
For more Word tips and downloads visit my web site
https://www.gmayor.com/Word_pages.htm

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 1,837 Applies to: