Categories
Microsoft Word

Fields

Fields are placeholders for values that might change from one time or place to another. For example, page numbers, dates, file names, and table of contents.

When you insert a field in your document it stores as a field code, a special set of instructions that tells Word what to display. Usually what you see is the field’s result, the value that Word creates by evaluating the field code. For example, the {DATE \@ "M/d/yyyy"} field code is used to display the current date on the document.

To insert date field, click Insert tab, choose Date & Time from the Text group, choose a date format from the Date and Time dialog box, make sure the Update Automatically box is check, and click OK to insert the date. Press Alt+F9 to see date-field code. If you want to see field result instead of code, press Alt+F9 again:

Press Alt+F9 to toggle field code

Field dialog box

There are several ways to insert fields into a document, but the Field dialog box provides more types of fields. Click Insert tab, in the Text group, click Quick Parts and then click Field to open the dialog box:

Field dialog box

Insert a field with keyboard

A field code consists of:

  • Field markers {}: The entire field code is enclosed in a pair of field markers. Press Ctrl+F9 to insert a pair of field markers.
  • Field name.
  • Instructions, such as a formula.
  • Switches (optional), to modify or format the field’s result

To manually write the field code, click in your document where you want the field result to appear. Press Ctrl+F9 to insert a pair of field markers. Type the field code between the markers, including any text and switches that are needed to produce the code result that you want.

For example, to insert the date field manually:

  1. Press Ctrl+F9 to insert field markers
  2. Write DATE inside the field marks
  3. Click Update Field button which appears on top of the field marks (or press F9 keyboard button):
  1. After updating the field, code disappears and you can see the result of the field code (the current date).

Toggle field codes

To show or hide field codes for the entire document:

  1. Press Alt+F9 to display all the field codes.
  2. Press Alt+F9 again to redisplay all the field results.

To show or hide field code for a selection or specific field:

  1. Press Shift+F9 to display the field codes for a selection.
  2. Press Shift+F9 again to redisplay the field results for a selection.

Use mouse to toggle field code

Right-click the selection, and then in the shortcut menu that appears, click Toggle Field Codes to display the field codes of only the fields within the selected text:

Field Switches

You can control the appearance of fields that produce numbers, dates, or text as their field results by using optional switches that modify the result in the way that you specify. The insert the date field manually example inserts the date in Word’s default format. If you want to specify a date format other than the default form, or the format you want to use is not available in Field dialog box, you need to use the Switches.

Press Alt+F9 to manually edit the date field, or open the Field dialog box (Insert > Quick Parts > Field), select Date and click Field Codes:

Click Field Codes to customize the field format

Write field code to format the date field, for example, the DATE \@ "dddd, MMMM d" code displays Thursday, January 14:

Write code in Field codes box or click Options to see the available switches

Click the Options button to see the available switches for the Date field:

Date-Time Picture switches to format other than the default format

The Field Specific Switches:

Use different calendar

More Fields Tutorials:

  1. Word Fields
  2. The ListNum field
  3. List Numbering using SEQ Fields
  4. Hide, Unhide, Lock, or Unlock Fields
  5. Apply Formula Field in Paragraphs