How to Automate Microsoft Word by Inserting and Updating Fields

by Avantix Learning Team | Updated March 2, 2018

Applies to: Microsoft® Word® 2010, 2013 and 2016 (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 Add or Remove Page Breaks in Microsoft Word

Where is the Field command?

The 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 Fields.

Below is the Field dialog box in Word:

Microsoft Word Field dialog box to insert or edit fields.

Inserting a field

To insert a field:

  1. Click 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 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 type field code brackets on the keyboard. To insert field code brackets manually, press Control + F9.

Editing a field through the Field dialog box

To edit a field through 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 automatically updates fields when a document is opened. If you prefer, you can update fields manually.

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

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

Fields in headers, footers or text boxes must be updated separately. Click in the header, footer or text box, press Control + A to select all and then press F9.

You can also lock fields to prevent automatic or inadvertent updating of the field. To lock a field so that field results are not updated, click the field, and then press Control + F11. To unlock a field so that field results can be updated, click the field, and then press Control + 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 |

Microsoft Word Tip: Create Dynamic Documents Using Fields
Article Name
Microsoft Word Tip: Create Dynamic Documents Using 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