Skip to content

Word field codes for everyone

Word field codes are a way to add some automation or automatic content into your documents. A simple example is the { DATE } field which will add the current date to a letter.

Chances are good that you’ve already used field codes and not realised it. Date, PrintDate, Page numbering (current and total pages), chapter names in a header are just some Word features that use Field Codes. Word Mail Merge is all about field codes.

Even the humble web link is a field code – any link in Word looks like this when you view field codes: {HYPERLINK “https://office-watch.com/”} . That’s essential knowledge if you want to find/replace web links or just figure out why a link isn’t working.

Insert Field Codes

The quick way to add a Word field code is from Insert | Text, click on the Quick Parts icon and choose ‘Fields …’ in Word for Windows or Mac.

Then choose the field code you want from the list on left.

The options in the center and right sections will change, depending on the field code selected.  In the above case, a list of all Quick Parts / Building Blocks.

Here’s the DATE field with formatting and other options:

All the options in the Insert | Field dialog are available from the switches and settings in the field itself.

Choose the options you want and click OK to insert the field.

Show the field code

Normally, Word shows the result of the field code unless you click inside it, then it turns to gray.

Often, you’ll want to see the field code and perhaps change it.  Press Alt + F9  to reveal the field codes or Shift + F9 to reveal only the currently selected field code.

You can now alter the field code and details.   Alt + F9 again to hide the field codes.

Ctrl + A (Select all) then F9 will update all the fields in a document.

All the Field Code options

For some, but not all, field codes Word shows a more easily understood version of the options. Here’s the Field Properties for PrintDate as shown by Insert Field

Choose from the options shown. To see more choices or tinker with the preset options click Field Codes at bottom left.

Now you can see the exact field code and can change it. We’ve edited the date/time format away from the preset choice to something similar.

At bottom left is ‘Hide Codes’ which takes you back to the main field properties window.
OR choose ‘Options…’ which appears for some field codes.

Field Options dialog

Now you can see more General Switches or formats.

Field Specific Switches

The Field Specific Switches tab shows the options and their field codes

If you want to learn more about field codes and switches, this dialog is a good way to understand the options and the matching switches.

Typing field code curly brackets

The curly brackets/braces you see aren’t the normal { }  you can type from the keyboard. 

Make the field code brackets by pressing Ctrl + F9

The Insert | Field command is a more reliable way to start a new field code.

Convert a field to text

Sometimes you want to remove the field code and leave only the result.  Do this so the field code isn’t updated any more.

A common use for this is the DATE or PRINTDATE fields which you may want to stay fixed at the current date and not change.

Microsoft calls this ‘Unlinking’ a field.  The rest of us would say it’s converting a field code into it’s result or text.

Unlinking/converting is only available via the Ctrl + Shift + F9 shortcut.

Locking a field

The alternative to unlinking or converting a field is to Lock it.

Lock a field: Ctrl + F11

Unlock a field: Ctrl + Shift + F11

Locking a field prevents the field from being updated while retaining the field code.  That means the displayed result of the field won’t change until the field is unlocked and updated.

A locked field has the Update Field option greyed out.

Whether you use unlinking or locking is up to you.

Personally, for the final version of a letter or other important document, we use Unlinking.  That especially applies to dates.  All manner of confusion, embarrassment and accusations can arise if an important past letter appears with the wrong date, because the Word field code has been updated.  Unlinking ‘fixes’ the date shown in the document with no risk of accidental updating.

More Word Find / Search tricks
Find and Replace links in Word documents
All the \* named format switches for Word field codes
Choices for formatting fields in Word Mail Merge
Show field codes gaffe

About this author

Office-Watch.com

Office Watch is the independent source of Microsoft Office news, tips and help since 1996. Don't miss our famous free newsletter.