How to Automate Microsoft Word by Inserting and Updating Fields

by Avantix Learning Team | Updated November 1, 2019

Applies to: Microsoft® Word® 2010, 2013, 2016, 2019 or 365 (Windows)

You can create dynamic components in your Word documents by inserting and updating fields. When you use built-in commands and features, many Word fields are inserted automatically. For example, if you insert a dynamic date or page numbering, Word inserts fields in your document. Essentially, fields are variables that are inserted using field codes. Update your fields and your document updates automatically!

You normally see the result of a field or variable rather than the codes but you can display field codes. In this article, we’ll discuss inserting and updating fields but, as you get more comfortable with fields, you can edit the field codes directly and even apply different types of formatting using switches.

Recommended article: How to Use Mail Merge in Word for Form Letters

Note: If you are working with fields in Microsoft Word, you will be using quite a few function keys (such as F9). On some laptops, you will need to press the Fn key on your keyboard to enable your function keys. For example, instead of pressing F9, you would press Fn + F9.

Where is the Insert Field command?

The Insert Field command is hidden in the Ribbon so it’s a bit difficult to find.

To access it, you’ll need to click the Quick Parts button on the Insert tab. The Field command appears in the drop-down menu as follows:

Microsoft Word Quick Parts drop-down menu with Field command to insert a field.

The Field dialog box appears as follows in Microsoft Word:

Microsoft Word Field dialog box to insert or edit fields.

Inserting a field using the Field dialog box

To insert a field using the Field dialog box:

  1. Navigate to the location in the Word document where you want to insert a field.
  2. Click the Insert tab in the Ribbon.
  3. Click Quick Parts. A drop-down menu appears.
  4. Select Field. A dialog box appears.
  5. In the list of Field names, select a field. You can filter the list by clicking the down arrow in the Categories list and selecting a category first.
  6. Under Field properties, select any properties or options you want.
  7. To see the codes for a particular field in the Field box, click Field Codes. For some fields, this button is clicked by default.
  8. Ensure that Preserve Formatting During Updates is checked so that formatting you apply is not removed when the fields are updated.
  9. Click OK. The field is inserted into the document.
  10. Format the field results by applying text formatting to the field using the Home tab in the Ribbon.

Viewing or hiding field codes

You can view or hide field codes in your document by pressing Alt + F9. Field codes appear between braces or curly brackets { }.

When you view field codes in your document, fields appear as follows:

{ FIELD NAME Properties Optional switches }

  • FIELD NAME is the name that appears in the list of field names in the Field dialog box.
  • Properties are any instructions or parameters that are used in a particular field. Not all fields have properties or parameters  and, in some fields, parameters are required.
  • Optional switches are any optional settings that are available for some fields. Switches are another way of formatting specific fields.

You cannot insert a field by typing field code braces or curly brackets on your keyboard. To insert field code braces, press Ctrl + F9 to insert the braces and then you can type the remainder of the field using the correct syntax.

Editing a field in the Field dialog box

To edit a field in the Field dialog box:

  1. Right-click the field and then click Edit Field. A dialog box appears.
  2. Change the field properties and options.
  3. Click OK.

For some fields, you must display the field code first to edit the field. To display all the field codes in the document, press Alt + F9. Be sure to hide the field codes later by pressing Alt + F9 again.

Some fields are edited in their own dialog boxes instead of in the Field dialog box. For example, if you right-click a hyperlink and then click Edit Hyperlink, the Edit Hyperlink dialog box appears.

Highlighting fields with grey shading

Fields can also be highlighted with grey shading to make them more visible in the document. Normally, when you click in a field, it appears with grey shading.

To change the shading settings for fields:

  1. Click the File tab in the Ribbon.
  2. Click Options. A dialog box appears.
  3. Click Advanced in the categories on the left.
  4. Under Show document content, in the Field shading list, select Always, Never or When selected (the default setting).
  5. Click OK.

Below is the Options dialog box:

Microsoft Word Options dialog box with field shading options.

Updating fields

By default, Word should automatically update fields when a document is opened. Many fields are also updated automatically when you go to Print Preview (click the File tab and then click Print). If you prefer, you can update fields manually.

To update a field manually, right-click the field and then click Update Field or press F9.

To update all fields manually in the main body of a document, press Ctrl + A to select all and then press F9.

Some fields in headers, footers or text boxes must be updated separately. Click in the header, footer or text box, press Ctrl + A to select all and then press F9. Page fields (which display page numbering) do not need to be updated manually (they update when you go the Print Preview).

Locking fields

You can also lock fields to prevent automatic updating of the field. To lock a field so that field results are not updated, click the field, and then press Ctrl + F11.

To unlock a field so that field results can be updated, click the field, and then press Ctrl + Shift + F11.

Recommended article: How to Export PowerPoint Handouts to Microsoft Word

Subscribe to get more articles like this one

Did you find this article helpful? If you would like to receive new articles, join our email list.

Recommended Microsoft Office courses

Microsoft Word: Intermediate / Advanced

Microsoft Excel: Intermediate / Advanced

Microsoft PowerPoint: Intermediate / Advanced

Microsoft Access: Introduction


Avantix Learning instructor-led classroom courses are held in downtown Toronto, Ontario, Canada. Contact us if you’d like to arrange custom training at your site or ours.

To request this page in an alternate format, contact us.

Copyright 2019 Avantix® Learning Inc.

You may also like

Microsoft, the Microsoft logo, Microsoft Office and related Microsoft applications and logos are registered trademarks of Microsoft Corporation in Canada, US and other countries. All other trademarks are the property of the registered owners.

Avantix Learning | 1 Yonge Street, Suite 1801 (Toronto Star Building), Toronto, Ontario, Canada M5E 1W7 |

Create Dynamic Microsoft Word Documents Using Fields (Insert, Format and Update Fields)
Article Name
Create Dynamic Microsoft Word Documents Using Fields (Insert, Format and Update Fields)
You can create dynamic components in your Microsoft Word documents by inserting and updating fields. Essentially, fields are variables that are inserted using field codes. Update your fields and the document updates automatically!
Publisher Name
Avantix Learning

Pin It on Pinterest

Share This