In this post we will look at three other types of built-in Word objects that help us automate the process of customization: Field, Links and Content Controls.
Microsoft Word Fields are one of the oldest forms of automation available in Word. To insert a Field, go to the Insert Tab on the Word Ribbon, and click on ‘Field’ from the Quick Parts drop-down:
The Fields Dialog Box presents a long list of possible Fields to choose from:
In this post we will look at one example: the ‘Ref’ Field. This field will ‘Refer’ back to a bookmarked section of the document, and display the bookmarked contents. For example, we select the following content:
Next we add a Bookmark:
We return to the Fields Dialogbox. Note, when we select the ‘Ref’ field, a list of Bookmarks in the current document also appears:
Here is the resulting ‘Ref’ field inserted into the Word Document:
To update a Field, right click to see the following pop-up menu:
Expedience TIP: Shortcut Key Ctrl+F9 Updates all Fields contained in the current selection.
The most common form of Microsoft Word Links are Links to Microsoft Excel. Theses Links can point to entire Spreadsheet tables, charts, or even single cells of data. The simplest way to insert an Excel Link is to open Excel, Select and Copy the desired range to the clipboard.
Open Word and place the cursor in the desired Link Location. Go to the Home tab on the Word Ribbon and select ‘Paste Special’:
In this case we are pasting a Link, so that when the Link is updated it will display the current data from Excel.
Expedience TIP: to blend a Link to an Excel Cell value within other Word content, select the ‘Unformatted Text’ option in the Paste Special Dialog box.
Unlike Word Fields which must be updated manually or through code, you can set Links to be updated automatically. Select a Link and Right Click to see a pop-up menu of Link options:
Select the option ‘Links…” to set Automatic Link updating:
Content Controls were first introduced by Microsoft in Word 2007 and enhanced in Word 2010 and 2013.
Content Controls appear in many of the built-in Word Building Blocks, such as in the Cover Page Example below:
You can access the Content Controls from the Word ‘Developer’ tab.
There are 7 types of controls are available since Office 2007:
- Rich Text
- Text Box
- Combo Box
- Dropdown List
- Date Picker
Office 2010 adds ‘Check Box’ Controls. Office 2013 adds ‘Repeater’ Controls.
At Expedience we use them extensively to Automate Custom Content. The Expedience Automation Studio enhances the functionality of the Content Controls to make templates easier to develop and use.