How to Automate Microsoft Word by Inserting and Updating Fields

by Avantix Learning Team | Updated March 14, 2021

Applies to: Microsoft® Word® 2010, 2013, 2016, 2019, 2021 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.

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.

Recommended article: 21 Microsoft Word Formatting Shortcuts for Faster Formatting

Do you want to learn more about Microsoft Word? Check out our virtual classroom or live classroom Word courses >

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.

Insert 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.

View or hide 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.

Edit 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.

Highlight 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.

Update 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).

Lock 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.

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.

More resources

How to Insert a Line in Word (3+ Ways)

Microsoft Teams Keyboard Shortcuts (40+ Shortcuts)

How to Keep Text Together in Microsoft Word (Paragraphs, Lines or Words)

How to Create a Table of Contents in Word (Insert, Format and Update a TOC)

10+ Great Microsoft Word Navigation Shortcuts to Move Around Quickly in Your Documents

Related Courses

Microsoft Word: Intermediate / Advanced

Microsoft Word: Designing Dynamic Word Documents Using Fields

Microsoft Word: Long Documents Master Class

Microsoft Word: Accessible Word Documents

Microsoft PowerPoint: Intermediate / Advanced

VIEW MORE COURSES >

Our instructor-led courses are delivered in virtual classroom format or at our downtown Toronto location at 18 King Street East, Suite 1400, Toronto, Ontario, Canada (some in-person classroom courses may also be delivered at an alternate downtown Toronto location). Contact us at info@avantixlearning.ca if you'd like to arrange custom instructor-led virtual classroom or onsite training on a date that's convenient for you.

Copyright 2024 Avantix® Learning

You may also like

How to Generate Random Text in Word

How to Generate Random Text in Word

If you are creating a Microsoft Word document, template or mockup and you want to create placeholder text, you can generate random text using the built-in RAND function or LOREM function (which generates Latin or Lorem ipsum text).

How to Center Text Vertically in a Word Table (and Fix Common Issues)

How to Center Text Vertically in a Word Table (and Fix Common Issues)

You can center or align text vertically in cells in a Word table using commands in the Table Design or Table Tools Design tab in the Ribbon. If the text doesn't seem to align correctly, there are several common issues that may be affecting the alignment including extra blank paragraphs, paragraph spacing and cell margins.

How to Insert a Watermark in Word (like DRAFT)

How to Insert a Watermark in Word (like DRAFT)

You can insert a watermark in the background of one or more pages in a Microsoft Word document. Common watermarks are text such as DRAFT or CONFIDENTIAL but you can also add a picture watermark.

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 |18 King Street East, Suite 1400, Toronto, Ontario, Canada M5C 1C4 | Contact us at info@avantixlearning.ca

Summary
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)
Description
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!
Author
Publisher Name
Avantix Learning

Pin It on Pinterest

Share This