Word field codes for everyone

Office for Mere Mortals
Your beginners guide to the secrets of Microsoft Office
Invalid email address
Tips and help for Word, Excel, PowerPoint and Outlook from Microsoft Office experts.  Give it a try. You can unsubscribe at any time.  Office for Mere Mortals has been running for over 20 years, we've never, ever revealed or sold subscriber details.  Privacy policy

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.

word field codes explained 11600 - Word field codes for everyone

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

word field codes explained 11602 - Word field codes for everyone

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:

word field codes explained 11603 - Word field codes for everyone

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.

word field codes explained 11604 - Word field codes for everyone

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.

word field codes explained 11605 - Word field codes for everyone

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

image 81 459x296 - Word field codes for everyone

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.

image 82 462x296 - Word field codes for everyone

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.

image 84 294x296 - Word field codes for everyone
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

image 86 295x296 - Word field codes for everyone

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.

image 80 - Word field codes for everyone

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
Show field codes gaffe
Formatting Mail Merge fields

subs profile e1563205311409 - Word field codes for everyone
Latest news & secrets of Microsoft Office

Microsoft Office experts give you tips and help for Word, Excel, PowerPoint and Outlook.

Give it a try. You can unsubscribe at any time.  Office Watch has been running for over 20 years, we've never, ever revealed or sold subscriber details.  Privacy policy
Invalid email address