Dealing with Fields in Microsoft Word

Topic: { Fields } in Microsoft Word

Word Versions: Word 97 - Microsoft 365

This does not apply to Word Online, IOS, or Android although most fields work in those versions. It does apply to Word on the Mac and in Windows.

Level: Beginner-Intermediate

Note: This is an Article that was created on the Microsoft Answers site that I saved so it could be edited. Despite appearances, it is not on a Microsoft site, now.

Purpose: This is not a thorough exploration of fields. It is intended to be a short view of what can be done when using fields. There is a list of good references at the bottom of this article.

What is a field?

A field is a method of having dynamic content in Word.

That is, content that changed depending on other information in the document or the user's system.

It is not a Content Control although Content Controls can be included in fields. Fields are an old technology in Word and have changed little over the years.

A few of the more-common examples are:

How can I insert a Field in a document?

You cannot simply type the field code! Only Word can create a Word field.

You can call up the Insert Field dialog

There are a number of ways to do this. In menu (older) versions of Word, it is Insert > Field.

In Ribbon versions on Windows, you can find this under Insert > Quick Parts > Fields.In Ribbon versions on the Mac, I believe it is still Insert > Field.

You can use the keyboard shortcuts to call up this dialog:

  • Windows version: Alt+I, F

  • Mac version: Opt+I,F

There are keyboard shortcuts for a few particular fields, shown below.

Fields in Tables

If you are trying to insert a complex field in a Table, there is often no room in the cell to see and edit the field. Create and edit it outside the table structure then paste it back in.

Numerous commands and buttons insert particular fields. You may never see the field itself.

  • Date

  • Table of Contents

  • Cross-Reference

  • Hyperlink

  • Index

Although you cannot simply type a field, you can insert a blank field and type the name and switches. (Ctrl+F9 keyboard shortcut)

This keyboard shortcut inserts a matched pair of Field delimiter braces { } into which you can type. This requires that you know the field name and syntax as well as switches. It is the only way to create nested fields.

Once you create a complex field the way you want it, you can select it and save it as AutoText or another Building Block for reuse.

(You could even save as a formatted AutoCorrect entry!)

Where can I find documentation on fields?

Here is the Microsoft documentation on fields: List of Field Codes in Word with Documentation Links

Here is my page on fields: Using Fields in Microsoft Word

(more further on in the page)

How can I see what the coding of a field is in Word?

Here is what a field looks like in a document:

Wednesday, 5 January 2022

It may have shading applied:

Image.

That really gives you no idea of what the field is doing, only what it is displaying. Word does let you look under the hood very easily, though. There are two quick methods:

  Toggle Field Code Command - Shift+F9 keyboard shortcut

Image.

Image.

If you use Shift+F9, pressing  F9 will return you to the result and hide the code.

Alt+F9 is a toggle of a setting in Word and applies until you toggle back. (You will continue to see field codes rather than the results until the setting is toggled back to display of results.)

Toggling field code display is the only way to create nested fields (without macros).

You can also set this in Word Options (Advanced) but the keyboard shortcut is so handy, why bother. If you want to bother, here is the dialog box under File > Options > Advanced:

ImageImage.

Toggling Field Code Display does not work for TC, TA, XE or Private fields.

There is an option in Word to print field codes.

  • If you have that option checked, field codes will print instead of the field result (text) even if they are not displayed in the document.

  • If you have the option checked/toggled to display field codes, they will print regardless of the setting for printing field codes.

What are the Function Keys and keyboard shortcuts for manipulation of Fields?

There are a number, and some of the handiest ones do not seem to be documented by Microsoft. They can vary by operating system as well.

With any of the Function Keys, on many computers, it is necessary to add the Fn shift key; i.e., instead of Alt+F9 or Opt+F9, the user needs to press Fn+Alt+F9 or Fn+Opt+F9.

Here is my writing on that on my website: Function Keys and Keyboard Shortcuts that Manipulate Fields. The following table is from that page.

Windows Keys

What

Macintosh Keys

F9

Update/Refresh Selected Field

F9

Shift+F9

Display/Hide Field Codes (selected field) *

Shift+F9

Alt+F9

Display/Hide All Field Codes (all fields in document) **

Opt+F9

Ctrl+F9

Create Empty Field 
(Insert { } Braces)

Cmd+F9

Alt+Shift+F9

Run Macro (MacroButton Field Only)

Opt+Shift+F9

Ctrl+Shift+F9
or
Ctrl+6

Unlink Selected Field (delete all field coding and replace with field result) - turn field into text

Cmd+Shift+F9

or

Cmd+6

F11

Go to (Select) Next Field

F11

Shift+F11

Go to (Select) Previous Field

Shift+F11

Ctrl+F11
or
Ctrl+3

Lock Field (prevent manual or automatic update)

Cmd+F11
or
Cmd+3

Ctrl+Shift+F11
or
Ctrl+4

Unlock Field (allow updating)

Cmd+Shift+F11
or
Cmd+4

Alt+I, F

Alt, I, F ****

Insert Field (Dialog Box
(Alt+I followed by F)

Recent versions Alt, release, I, release, F

Opt+I,F

Alt+Shift+D

Insert Date Field ***

Ctrl+Shift+D

Alt+Shift+T

Insert Time Field ***

Ctrl+Shift+T

Alt+Shift+P

Insert Page Field

Ctrl+Shift+P

Ctrl+Alt+L

Insert ListNum Field

Cmd+Shift+Opt+L

* It is possible to have fields inside of fields (nested fields). If this is the case, the Shift+F9 Toggle will not show all the field codes, only the outermost layer. To see all the field codes, use Alt+F9 instead. This is demonstrated above. For more about this, look at Display of Field Codes in my page.

** Alt+F9 is the same as checking / unchecking Field Codes in Tools => Options => View. Unlike a field code toggled using Shift+F9, if you update a field while all field codes are being displayed, the new field result will still be hidden and you will still see the field codes.

*** Probably not the field you want to insert, though. This gives the continuously updating field. See my page on Datefields in Microsoft Word.

**** Recent versions of Word have replaced the Alt+I and Alt+O prefixes for legacy menu shortcuts with Alt,I and Alt,O where the Alt key is released.

If the function keys are not working, chances are good it has to do with your Computer (or another program) intercepting them. See Hijacked Function Keys. Try adding the Fn shift key to the key combination.

See also MVP Lene Fredborg's article: Word Fields – Useful Keyboard Shortcuts – Word Macros and Tips

(end of quoted material)

There is a limit on the depth to which fields can be nested.

I believe that this limit is  20 deep. At least, that is what Paul Edstein (macropod) says about the nesting limit for IF fields. That is you can have one field inside another field inside another field, etc., to a depth of  20 levels. This is almost never needed. Often, the purpose can be accomplished simply by multiple IF fields, not nested.

Some Fields do not show all of their information when toggled using Alt+F9 or Shift+F9.

I know this is the case with the AutoTextList and Hyperlink fields. This is demonstrated for the Hyperlink field in my response here.

You can address this by editing the field using the dialog. That will let you see the display text for the field.

Updating is not automatic! F9 is your friend!

See Some Fields are Updated While Others Are Not

You can, in most instances use the keyboard shortcuts:

  • Ctrl+A to select all, followed by ...

  • F9 (or on some computers Fn+F9)

If the fields are in a different "story" than the main body of your text, this will not reach them. The following macro will update all fields in a document.

Sub UpdateAllFields()

' From Greg Maxey 2013-09-30

' http:// answers.microsoft.com/en-us/office/forum/office_2007-word/how-to-update- all-fields-in-a-document-at-once/54b43181-0ea7-4abc-bfb9-e0555125dfe5? page=3#LastReply

' Dim rngstory As Word.range, lngJunk As Long, oShp As Shape

Dim oTOC As TableOfContents, oTof As TableOfFigures, oToa As TableOfAuthorities

'

lngJunk = ActiveDocument.Sections(1).Headers(1).range.StoryType

For Each rngstory In ActiveDocument.StoryRanges

'Iterate through all linked stories

Do

On Error Resume Next

rngstory.Fields.Update

Select Case rngstory.StoryType

Case 6, 7, 8, 9, 10, 11

If rngstory.ShapeRange.Count > 0 Then

For Each oShp In rngstory.ShapeRange

If oShp.TextFrame.HasText Then

oShp.TextFrame.TextRange.Fields.Update

End If

Next

End If

Case Else

'Do Nothing

End Select

On Error GoTo -1

'Get next linked story (if any)

Set rngstory = rngstory.NextStoryRange

Loop Until rngstory Is Nothing

For Each oTOC In ActiveDocument.TablesOfContents

oTOC.Update

Next oTOC

For Each oTof In ActiveDocument.TablesOfFigures ' Added by CKK

oTof.Update

Next oTof

' For Each oToa In ActiveDocument.TablesOfAuthorities ' Added by CKK

' oToa.Update

' Next oToa

Next

End Sub

It is also possible to have macros that update only certain fields like AutoText.

Sub AutoTextFieldUpdateAllStory()
' Written by Charles Kyle Kenyon 9 March 2021
' assistance from Jezebel
' All Story Field Updater - AutoText fields
Dim oField As Field
Dim oStory As range
' On Error Resume Next
For Each oStory In ActiveDocument.StoryRanges
' This goes into headers and footers as well as the regular document
Do
For Each oField In oStory.Fields
If oField.Type = wdFieldAutoText Then
oField.Update
End If
Next oField
Set oStory = oStory.NextStoryRange
Loop Until oStory Is Nothing
Next oStory
Set oStory = Nothing
On Error GoTo -1
End Sub

Other references:

Additional writing on my site about individual fields and using fields:

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

The link for the documentation for field codes in the middle of this page (see below), does not take user to the documentation it mentions.

Here is the Microsoft documentation on fields: Field codes in Word

2 people found this comment helpful

·

Was this comment helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

The link for the documentation for field codes in the middle of this page (see below), does not take user to the documentation it mentions.

Here is the Microsoft documentation on fields: Field codes in Word

Thank you. You are correct.

I changed it to:

List of Field codes in Word

Volunteering to "pay forward" the help I've received in the Microsoft user community.

Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

2 people found this comment helpful

Repaired damage done by the Forum's changes (formatting and false links to images).

Volunteering to "pay forward" the help I've received in the Microsoft user community.

Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

I added the following to the article:

Fields in Tables

If you are trying to insert a complex field in a Table, there is often no room in the cell to see and edit the field. Create and edit it outside the table structure then paste it back in.

Volunteering to "pay forward" the help I've received in the Microsoft user community.

Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

Added note about need to use Fn shift key on many computers.

Additional note about toggling field code display not working with TC, TA, XE, or Private fields which are hidden instead.

Volunteering to "pay forward" the help I've received in the Microsoft user community.

Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

1 person found this comment helpful

Added link to

This is an archived Microsoft Help page for Word 2010 fields and is useful for other versions as well. It explains things a bit differently than other sources.

Volunteering to "pay forward" the help I've received in the Microsoft user community.

Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

1 person found this comment helpful

I've added more links to the documentation for common fields.

Volunteering to "pay forward" the help I've received in the Microsoft user community.

Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

For everyone's convenience MS has apparently changed the menu route to insert fields. Here it is described as "you can find this under Insert > Quick Parts > Fields". On 4/2/2025 in my (Office 360 rental) Word it is instead in Header & Footer/Quick Parts, where "Header & Footer" magically appears in the Ribbon when the insertion point is in the Header or Footer section (and Quick Parts is in a section of the ribbon/menu/whatever-it-is labeled "Insert", though i see no function for that grouping, save as a label.)

Was this comment helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

When the header/footer is open for editing, you get an alternative path to displaying the Field dialog box, as you have noted: Header & Footer tab > Insert group > Quick Parts > Field.

Image

The Insert tab > Text group > Quick Parts > Field option still exists, though.

Image

Stefan Blom
MVP
Volunteer Moderator
~~~
Please specify application version & OS in your question
~~~
This Community closes for new questions on July 16, 2025
Forums are moving to Microsoft Q&A

Was this comment helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this comment?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this comment?

Thanks for your feedback.

Mea culpa. If the window is too narrow to display the longer version, "quick parts" is collapsed to an icon (as I think your image shows) and I didn't see it. Hovering over the icon gets a lot of detail.

If the widow is wide enough, one does see the text "quick parts".

Image

You found this comment helpful

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

*
Please select edit reason
 
 

Forum Article Info


Last updated April 17, 2025 Views 87,370
Top Content
Applies to: