I'm trying to create a master template that some things can auto fill through out the document in MS Word-365
Like the word "police" It's in the document 45 times. But...if I'm working with the fire department, the template would fill as "fire" Ideally, I would like to have boxes open that say:
- Department
- Rank
- City
And the person could type in the name of those things and then they would automatically fill in the rest of the document.
Can this be done? Do I need VB or JS?
Thanks!
1 Answer
Yes it can be done. You do not need JS or VBA.
The simplest method is using Mapped Content Controls.
There are 15 of these built into the Windows version under Quick Parts > Document Properties. These can be "repurposed." This is my page discussing that. Repeating Data Using Document Property Content Controls or other Mapped Content Controls
Essentially, you can insert one of these, rename it in your document and change the placeholder text to prompt users. Then copy that modified control to other places. A change made in one spot will be reflected in all copies. This is what is done in many of the templates from Microsoft. These are known as Cover Page Properties.
You can also create your own. This is not as simple but there are utilities to assist with that. This is also discussed in my page.
On a Mac, Content Controls can be used but can not be created. The Mac interface does not currently have Quick Parts. Templates can be created in the Word version and will work on a Mac. Otherwise, it requires vba programming on a Mac to create or modify Content Controls. Here is Word MVP John Korchock's page on doing this.
There are other ways as well. If the template is to be used on versions of Word pre Word 2007, content controls will not work.
As far as I know, these are all discussed and demonstrated in Greg Maxey's page on Repeating Data (Populating Multiple Like Fields).
The advantage of the Mapped Content Controls is that the changes take effect throughout the document immediately upon exiting the Content Control. Others generally require refreshing the destination fields, which is not automatic.