In today’s article, we are thrilled to present you 3 quick ways to find all fields in your Word document.
By default, the fields we insert into Word document take the same text style as normal one. Therefore, you will find it hard to distinguish them from plain texts. This can leads to accidental editing or deletion of an important field. This article is dedicated to 3 quick workarounds to stand out fields.
Method 1: Alter the “Word Options”
Generally, you can see the gray shading when you hovering cursor over a field. Such shading is like a kind of identification for field. The good news is you can turn it on even the cursor is not over a field.
- Firstly, click “File” tab.
- Then click “Options” to open “Word Options” dialog box.
- Next click “Advanced”.
- Scroll down to the “Show document content” section. Find the “Field shading” option and choose “Always” instead of the default “When selected”.
- Lastly, click “OK” to save the change.
You need to be aware that this modification affects globally. Not only fields on this document but all other ones now have field shading.
Method 2: Use “Find” Function
- First and foremost, press “Alt+ F9” to show all field codes.
- Next click “Home” tab and click the arrow button behind the “Find” command.
- On the menu choose “Advanced Find” to trigger the “Find and Replace” dialog box.
- Put cursor in “Find what” text box and enter “^d” to find all fields.
- Next click “Find In” and choose “Main Document”.
- You will see all fields are in selection now. You can choose to highlight them as to stand out.
- Finally, press “Alt+ F9” to toggle from codes back to text.
Method 3: Highlight All Fields via VBA
- To begin with, press “Alt+ F11” to quickly open VBA editor.
- Under “Normal” project, click “Insert” and choose “Module” to create a new one.
- Next double click to open the module as to bring out the editing area on the right side.
- Then paste the bellowing codes on the module:
Sub ShowFieldsInDoc() Dim objField As Field Dim objDoc As Document Dim strCodeText As String Set objDoc = ActiveDocument With objDoc For Each objField In .Fields If objField.Type = wdFieldRef Or wdFieldPageRef Then objField.Select Selection.Range.HighlightColorIndex = wdYellow End If If objField.Type = wdFieldHyperlink Then objField.Select Selection.Range.HighlightColorIndex = wdNoHighlight End If Next objField End With End Sub
- Last but not the least, click “Run”.
This macro highlight fields in yellow, but leave hyperlinks intact whose default style is easy to recognize enough.
How to Efficiently Recover from Broken Files
Nowadays, it’s not unusual to encounter with docx damage, since we use Word so often to process documents. And you have to understand that being panic or mournful has nothing to do with efficient file recovering. Once file damage occurs, your primary option should be getting a fixing tool.
Author Introduction:
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including xlsx damage and pdf repair software products. For more information visit www.datanumen.com
Inserting fields can give you precise control over dynamic text in your document. Fields are an important part of Word, but it’s good to know that many fields are inserted for you through built-in commands and features. For example, fields are at work when you insert page numbers or create a table of contents. In these cases, it’s probably simpler to let Word automatically add them for you. Fields are most useful when you need placeholders for data that might change in your document and for creating form letters or labels in mail-merge documents.
These steps work for inserting any field code in Word. For a list of all field codes with detailed information about each, see List of field codes in Word.
Insert a field
-
Click where you want to insert a field.
Tip: If you know the field code for the field that you want to insert, you can type it directly in your document. First press CTRL+F9, and then type the code within the brackets.
-
Click Insert > Quick Parts > Field.
-
In the Field names list, select a field name.
Tip: You can filter the list by clicking the down arrow in the Categories list.
-
Under Field properties, select any properties or options you want, and click OK.
Notes:
-
To see the codes for a particular field in the Field box, click Field Codes. For some fields, this button is clicked by default.
-
To nest a field within another field, first insert the outer, or container, field (steps 1-4 above). Then place the insertion point inside the field code where you want to insert the inner field, and repeat steps 2-4 above.
-
If you want to see the codes for a particular field in the Field dialog box, click Field Codes.
-
To nest a field within another field, first insert the outer, or container, field, by using the Field dialog box. In your document, place the insertion point inside the field code where you want to insert the inner field. Then use the Field dialog box to insert the inner field.
If you know the field code for the field that you want to insert, you can also type it directly in your document. First press CTRL+F9, and then type the code within the brackets.
About field codes and syntax
You can insert a field if you want to:
-
Add, subtract, or perform other calculations. To do so, use the = (Formula) field.
-
Work with documents in a mail merge. For example, insert ASK and FILLIN fields to display a prompt as Word merges each data record with the main document.
In other cases, it is simpler to use the commands and options that are provided in Word to add the information that you want. For example, you can insert a hyperlink by using the HYPERLINK field, but it is easier to use the Hyperlink command in the Links group on the Insert tab.
Important: You cannot insert field code brackets by typing the brace characters on the keyboard. To insert field code brackets, press CTRL+F9.
Field code syntax
Field codes appear between curly brackets ( { } ). Fields behave like formulas in Microsoft Office Excel — the field code is like the formula, and the field result is like the value that the formula produces. You can switch between displaying field codes and results in your document by pressing ALT+F9.
When you view a field code in your document, the syntax looks like this:
{ FIELD NAME Properties Optional switches }
-
FIELD NAME This is the name that appears in the list of field names in the Field dialog box.
-
Properties These are any instructions or variables that are used in a particular field. Not all fields have parameters, and in some fields, parameters are optional instead of required.
-
Optional switches These are any optional settings that are available for a particular field. Not all fields have switches available, other than those that govern the formatting of the field results.
For example, you can place the file name and path of your document in the header or footer by inserting the FILENAME field.
The syntax for the FILENAME field code with the path included looks like this:
{ FILENAME p }
Edit a field
-
Right-click in the field, and then click Edit Field.
-
Change the field properties and options. For information about the properties and options available for a particular field, see List of field codes in Word or search on the field name in Help.
Notes:
-
For some fields, you must display the field code to edit the field. To display all the field codes in the document, press ALT+F9.
-
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 opens
-
Display the field results
By default, Word displays the field results seamlessly with the content of your document so that someone reading the document is unaware that part of the content is in a field. However, fields can also be displayed with a shaded background, to make them more visible in the document.
You can make the field results blend into the content of the document by turning off the option to display fields with a shaded background and by formatting the field results, or you can call attention to fields by displaying them with a shaded background, either all the time or only when the field is selected.
You can format the field results by applying text formatting to the field or by adding formatting switches to the field code.
Change the shaded background of fields
-
Click the File > Options. (In Word 2007, click Microsoft Office Button , and then click Word Options.)
-
Click Advanced.
-
Under Show document content, in the Field shading list, do one of the following:
-
To make fields stand out from the rest of the document content, select Always.
-
To make fields blend in seamlessly with the document content, select Never.
-
To make users of Word aware that they have clicked in a field, select When selected.
When the field shading option is set to When selected, the field displays a gray background when you click within the field. However, the gray shading does not indicate that the field is selected. When you select the field by double-clicking or dragging the mouse, highlighting that indicates selection is added to the gray shading.
-
Apply text formatting to a field
-
Select the field that you want to format, and then apply the formatting by using the commands in the Font group on the Home tab.
For example, to underline the name that is inserted by an AUTHOR field, select the entire field code, including brackets (or select the entire field result), and then click Underline in the Font group on the Home tab.
If you update a field, any formatting that you applied to the field results may be lost. To retain the formatting, include the * MERGEFORMAT switch in the field code. When you insert fields by using the Field dialog box, the * MERGEFORMAT switch is included by default.
Add a formatting switch to a field code
-
Right-click the field, and then click Edit Field.
-
Do one of the following:
-
If Field properties and Field options are displayed, select the formatting options that you want.
-
If only the field code is displayed, click Options, and then select the formatting options that you want.
If the Options button appears dimmed, additional formatting options may not be available.
-
You can use three formatting switches to format field results:
-
Format switch (*)
-
Numeric format switch (#)
-
Date-Time format switch (@)
Format switch(*)
The Format field switch (*) defines how to display field results. The format instructions determine the following:
-
The use of uppercase and lowercase letters
-
Number formats — for example, whether 9 is displayed as ix (roman numerals) or ninth (ordinal text)
-
character formats
Format switches also retain a field result’s formatting when the field is updated.
Capitalization formats:
The following is a list of switches and the items that they capitalize:
-
* Caps This switch capitalizes the first letter of each word. For example, { FILLIN «Type your name:» * Caps } displays Luis Alverca even if the name is typed in lowercase letters.
To select this option in the Field Options dialog box, click Title case.
-
* FirstCap This switch capitalizes the first letter of the first word. For example, { COMMENTS * FirstCap } displays Weekly report on sales.
To select this option in the Field Options dialog box, click First capital.
-
* Upper This switch capitalizes all letters. For example, { QUOTE «word» * Upper } displays WORD.
To select this option in the Field Options dialog box, click Uppercase.
-
* Lower This switch capitalizes none of the result; all letters are lowercase. For example, { FILENAME * Lower } displays weekly sales report.doc.
This switch has no effect if the entire field that contains the switch is formatted as small capital letters.
To select this option in the Field Options dialog box, click Lowercase.
Number formats:
The following is a list of number switches and their results:
-
*alphabetic This switch displays results as alphabetic characters. The result has the same case as the word «alphabetic» in the field code. For example, { SEQ appendix * ALPHABETIC } displays B (instead of 2), and { SEQ appendix * alphabetic } displays b.
To select this option in the Field Options dialog box, click a, b, c,.
-
*Arabic This switch displays results as Arabic cardinal numerals. For example, { PAGE * Arabic } displays 31.
Notes:
-
If the Number format setting in the Page Number Format dialog box is not Arabic, this switch overrides the Number format setting.
-
For page numbers only, there is also an ArabicDash format, which displays results as Arabic cardinal numbers surrounded by hyphen characters. For example, { PAGE * ArabicDash } displays — 31 —.
To select this option in the Field Options dialog box, click 1, 2, ,3, ….
-
-
*CardText This switch displays results as cardinal text. The result is formatted in lowercase letters unless you add a format switch to specify a different capitalization. For example, { = SUM(A1:B2) * CardText } displays seven hundred ninety, and { = SUM(A1:B2) * CardText * Caps } displays Seven Hundred Ninety.
To select this option in the Field Options dialog box, click One, Two, Three.
-
*DollarText This switch displays results as cardinal text. Word inserts and at the decimal place and displays the first two decimals (rounded) as Arabic numerators over 100. The result is formatted in lowercase letters unless you add a format switch to specify a different capitalization. For example, { = 9.20 + 5.35 * DollarText * Upper } displays FOURTEEN AND 55/100.
To select this option in the Field Options dialog box, click Dollar Text.
-
*Hex This switch displays results as hexadecimal numbers. For example, { QUOTE «458» * Hex } displays 1CA.
To select this option in the Field Options dialog box, click hex ….
-
*OrdText This switch displays results as ordinal text. The result is formatted in lowercase letters unless you add a format switch to specify a different capitalization. For example, { DATE @ «d» * OrdText } displays twenty-first, and { DATE @ «d» * OrdText * FirstCap } displays Twenty-first.
To select this option in the Field Options dialog box, click First, Second, Third, ….
-
*Ordinal This switch displays results as ordinal Arabic numerals. For example, { DATE @ «d» * Ordinal } displays 30th.
To select this option in the Field Options dialog box, click 1st, 2nd, 3rd.
-
*roman This switch displays results as Roman numerals. The result has the same case as the word «roman» in the field code. For example, { SEQ CHAPTER * roman } displays xi, and { SEQ CHAPTER * ROMAN } displays XI.
To select this option in the Field Options dialog box, click I, II, III,.
Character formats and protecting previously applied formats:
The following are character formatting switches and their results:
-
*Charformat This switch applies the formatting of the first letter of the field name to the entire result. The result of the following example has bold formatting because the R in REF is bold.
{ REF chapter2_title * Charformat } displays Whales of the Pacific in bold text.
To add this switch, type it in the field code or in the Field codes box in the Field dialog box.
-
*MERGEFORMAT This switch applies the formatting of the previous result to the new result. For example, if you select the name displayed by the field { AUTHOR * MERGEFORMAT } and apply bold formatting, Word retains the bold formatting when the field is updated to display a new author name.
When you insert fields by using the Field dialog box , the *MERGEFORMAT switch is included by default. You can turn this option off by clearing the Preserve formatting during updates check box in the Field dialog box.
Back to formatting switches
Numeric format switch (#)
The Numeric format switch (#) specifies the display of a numeric result.
For example, the switch # $#,##0.00 in { = SUM(ABOVE) # $#,##0.00 } displays a result such as «$4,455.70.» If the result of a field is not a number, this switch has no effect.
Note: Quotation marks are not required around simple numeric formats that do not include spaces — for example, { MarchSales # $#,##0.00 }. For more complex numeric formats and those that include text or spaces, enclose the numeric format in quotation marks, as shown in the following examples. Word adds quotation marks to numeric format switches if you insert a field by using the Field dialog box or the Formula command in the Data group of the Layout tab (Table Tools contextual tab).
Combine the following format items to build a numeric format switch:
-
0 (zero) This format item specifies the requisite numeric places to display in the result. If the result does not include a digit in that place, Word displays a 0 (zero). For example, { = 4 + 5 # 00.00 } displays 09.00.
-
# This format item specifies the requisite numeric places to display in the result. If the result does not include a digit in that place, Word displays a space. For example, { = 9 + 6 # $### } displays $ 15.
-
x This format item drops digits to the left of the «x» placeholder. If the placeholder is to the right of the decimal point, Word rounds the result to that place. For example:
{ = 111053 + 111439 # x## } displays 492.
{ = 1/8 # 0.00x } displays 0.125.
{ = 3/4 # .x } displays .8. -
. (decimal point) This format item determines the decimal point position. For example, { = SUM(ABOVE) # $###.00 } displays $495.47.
Use the decimal symbol that is specified as part of the regional settings in Control Panel.
-
, (digit grouping symbol) This format item separates a series of three digits. For example, { = NetProfit # $#,###,### } displays $2,456,800.
Use the digit grouping symbol that is specified as part of the regional settings in Control Panel.
-
— (minus sign) This format item adds a minus sign to a negative result or adds a space if the result is positive or 0 (zero). For example, { = 10 — 90 # -## } displays -80.
-
+ (plus sign) This format item adds a plus sign to a positive result, a minus sign to a negative result, or a space if the result is 0 (zero). For example, { = 100 — 90 # +## } displays +10, and { = 90 — 100 # +## } displays -10.
-
%, $, *, and so on This format item includes the specified character in the result. For example, { = netprofit # «##%» } displays 33%.
-
«example formatting for positive; negative» This format item specifies different number formats for positive and negative results, separated by a semicolon. For example, if the bookmark Sales95 is a positive value, the field { Sales95 # «$#,##0.00;-$#,##0.00» } displays the value with regular formatting — for example, «$1,245.65». A negative value is displayed with bold formatting and a minus sign — for example, -$ 345.56.
-
«example formatting for positive; negative; zero» This format item specifies different number formats for a positive result, a negative result, and a 0 (zero) result, separated by semicolons. For example, depending on the value of the Sales95 bookmark, { Sales95 # «$#,##0.00;($#,##0.00);$0» } displays positive, negative, and 0 (zero) values as follows: $1,245.65, ($ 345.56), $0.
-
‘text’ This format item adds text to the result. Enclose the text in single quotation marks. For example, { = { Price } *8.1% # «$##0.00 ‘is sales tax’ » } displays $347.44 is sales tax.
-
`numbereditem` This format item displays the number of the preceding item that you numbered by using the Caption command (References tab, Captions group) or by inserting a SEQ field. Enclose the item identifier, such as «table» or «figure,» in grave accents (`). The sequential number is displayed in Arabic numerals. For example, { = SUM(A1:D4) # «##0.00 ‘is the total of Table’ `table`» } displays 456.34 is the total of Table 2.
Back to formatting switches
Date-Time format switch (@)
The Date-Time format switch (@) specifies the display of a date or time.
For example, the switch @ «dddd, MMMM d, yyyy» in the field { DATE @ «dddd, MMMM d, yyyy» } displays «Friday, November 23, 2007.» Combine the following date and time instructions — day (d), month (M), and year (y); hours (h) and minutes (m) — to build a date-time format. You can also include text, punctuation, and spaces.
Date instructions:
Month (M)
The letter M must be uppercase to distinguish months from minutes.
-
M This format item displays the month as a number without a leading 0 (zero) for single-digit months. For example, July is 7.
-
MM This format item displays the month as a number with a leading 0 (zero) for single-digit months. For example, July is 07.
-
MMM This format item displays the month as a three-letter abbreviation. For example, July is Jul.
-
MMMM This format item displays the month as its full name.
Day (d)
The letter d displays the day of the month or the day of the week. The letter d can be either uppercase or lowercase.
-
d This format item displays the day of the week or month as a number without a leading 0 (zero) for single-digit days. For example, the sixth day of the month is displayed as 6.
-
dd This format item displays the day of the week or month as a number with a leading 0 (zero) for single-digit days. For example, the sixth day of the month is displayed as 06.
-
ddd This format item displays the day of the week or month as a three-letter abbreviation. For example, Tuesday is displayed as Tue.
-
dddd This format item displays the day of the week as its full name.
Year (y)
The letter y displays the year as two or four digits. The letter y can be either uppercase or lowercase.
-
yy This format item displays the year as two digits with a leading 0 (zero) for years 01 through 09. For example, 1999 is displayed as 99, and 2006 is displayed as 06.
-
yyyy This format item displays the year as four digits.
Time instructions:
Hours (h)
A lowercase h bases time on the 12-hour clock. An uppercase H bases time on the 24-hour, or military, clock; for example, 5 P.M. is displayed as 17.
-
h or H This format item displays the hour without a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as 9.
-
hh or HH This format item displays the hour with a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as 09.
Minutes (m)
The letter m must be lowercase to distinguish minutes from months.
-
m This format item displays minutes without a leading 0 (zero) for single-digit minutes. For example, { TIME @ «m» } displays 2.
-
mm This format item displays minutes with a leading 0 (zero) for single-digit minutes. For example, { TIME @ «mm» } displays 02.
Seconds (s)
-
s This format item displays seconds without a leading 0 (zero) for single-digit seconds. For example { TIME @ «s» displays 5.
-
ss This format item displays seconds with a leading 0 (zero) for single-digit seconds For example { TIME @ «ss» displays 05.
A.M. and P.M. (AM/PM)
This displays A.M. and P.M. To change the A.M. and P.M. symbols for Microsoft Windows, change the regional settings in Control Panel.
-
am/pm or AM/PM This format item displays A.M. and P.M. as uppercase. For example, { TIME @ «h AM/PM» } and { TIME @ «h am/pm» } display 9 AM or 5 PM.
Other text and punctuation:
-
‘text’ This format item displays any specified text in a date or time. Enclose the text in single quotation marks. For example, { TIME @ «HH:mm ‘Greenwich mean time’ » } displays 12:45 Greenwich mean time.
-
character This format item includes the specified character in a date or time, such as a : (colon), — (hyphen), * (asterisk), or space. For example, { DATE @ «HH:mm MMM-d, ‘yy» } displays 11:15 Nov-6, ’99.
-
`numbereditem` This format item includes in a date or time the number of the preceding item that you numbered by using the Caption command in the Captions group (References tab), or by inserting a SEQ field. Enclose the item identifier, such as table or figure, in grave accents (`). Word displays the sequential number in Arabic numerals. For example, { PRINTDATE @ «‘Table’ `table` ‘was printed on’ M/d/yy» } displays Table 2 was printed on 9/25/02.
Note: Quotation marks are not required around simple date-time formats that do not include spaces or text — for example, { DATE @ MM/yy }. For more complex date-time formats and those that include spaces or text, enclose the entire date-time format in quotation marks, for example, { DATE @ «dddd MMMM d, yyyy’, at’ h:mm» }. Word adds quotation marks to date-time format switches if you insert a field by using the Date and Time command in the Text group of the Insert tab or the Field dialog box.
Back to formatting switches
Control how fields are updated
By default, Word automatically updates fields when a document is opened. That way, information stays up to date. There are situations where you might not want this to happen, however. For example, you may want the date in the header to reflect a particular date rather than automatically updating to the current date every time the document is opened.
Fields can also be updated by right-clicking a field and then clicking Update Field or by clicking in a field and then pressing F9.
To manually update all the fields in the main body of a document, press CTRL+A, and then press F9. Fields in headers, footers, or text boxes must be updated separately. Click within the header, footer, or text box, press CTRL+A, and then press F9.
You can lock fields to prevent automatic or inadvertent updating of the field.
Lock or unlock a particular field
Do one of the following:
-
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.
Lock results of BOOKMARK, INCLUDETEXT, and REF fields
The Lock Result (!) field switch prevents a field that is included in the result of a BOOKMARK, INCLUDETEXT, or REF field from being updated unless the field result in the original location has changed. Without this switch, Word updates fields that are included in a field result whenever the BOOKMARK, INCLUDETEXT, or REF field is updated.
For example, the field { INCLUDETEXT C:\SalesQtr4 Sales.doc ! } inserts the contents of the document «Qtr4 Sales.doc,» which contains a DATE field and an EMBED field. If you update the INCLUDETEXT field, the ! switch prevents Word from updating the DATE and EMBED fields in the included text unless they are first updated in the original document («Qtr4 Sales.doc»). The switch ensures that the text inserted by the INCLUDETEXT field matches the text in the original document.
To update the DATE and EMBED fields in both locations, update fields in the original document (Qtr4 Sales.doc), and then update the INCLUDETEXT field.
If you work a lot with Word documents, you cannot avoid using fields. Fields in Word are used for many purposes such as page numbers, cross-references and tables of contents.
By default, a number of keyboard shortcuts have been assigned to operations related to Word fields. Using those shortcuts will help you save time and mouse clicks. Also, some operations on fields can only be performed using shortcuts or via code.
In this article, you will find a list of useful Word field shortcuts including descriptions of how the shortcuts work.
About field codes and field results
Any field in Word consists of a set of curly field brackets, { }. Between the field brackets, you will find the field code that tells Word what to display, i.e. the field result. You can switch between displaying the field codes or the field results. You can only see the field brackets and field codes when field codes are displayed. To make sure fields show the correct results, they must be updated.
For details about how fields are updated, see my article Updating Fields in Word — How it Works. See the Microsoft article List of field codes in Word for information about the individual types of Word fields, their syntax and how to use them.
Examples of field codes
Page number: { PAGE }
Number of pages in a section: { SECTIONPAGES ]
Table of contents: { TOC o «1-3» h z u }
Short overview of field shortcuts — with names of related Word commands
For a quick overview of the Word field shortcuts, see the list below. For a detailed list with a description of each of the shortcuts, see Overview of Word field shortcuts — with detailed descriptions (found immediately below the short list).
The rightmost column shows the names of the Word commands that are executed by the shortcuts. Those names are the ones listed the Customize Keyboard dialog box in which you can modify keyboard shortcuts. To open the dialog box, select File > Options > Customize Ribbon > click the Customize button found next to the label Keyboard shortcuts. The Word command names can also be used in VBA.
- Note that most of the keyboard shortcuts related to fields involve the F9 key.
Shortcut |
What happens |
Executes Word command |
---|---|---|
F9 |
Updates all fields in the selection |
UpdateFields |
Alt+F9 |
Toggles between field codes and field results of all fields |
ViewFieldCodes |
Shift+F9 |
Toggles between field codes and field results of selected fields |
ToggleFieldDisplay |
Ctrl+F9 |
Inserts a set of field brackets |
InsertFieldChars |
Ctrl+Shift+F9 |
Converts selected fields to normal text (unlinks the fields) |
UnlinkFields |
Ctrl+F11 |
Locks selected fields |
LockFields |
Ctrl+Shift+F11 |
Unlocks selected fields |
UnlockFields |
Overview of Word field shortcuts — with detailed descriptions
The list below shows the same shortcuts as listed above. The rightmost column includes detailed descriptions of the individual shortcuts.
Shortcut |
What happens |
More details |
---|---|---|
F9 |
Updates all fields in the selection. |
A Word document consists of a number of stories: Main text story, header, footer, footnotes, endnotes, etc. You can only select content in one story at a time. If fields are found in more stories, you will need to update fields in each story. Alternatively, you can use a macro to update all fields in one operation. I have created a free macro for that purpose: Macro – Update all fields. Some fields are updated automatically. Other fields need to be updated manually. Some fields update when you switch to Print Preview. For detailed information about how the different types of Word fields update, see the article Updating Fields in Word — How it Works. A field shows an error if Word cannot show the result specified by the field code. This happens, for example, if a cross-reference field refers to a heading or another target that is no longer found. You will then see a result like this:
The field can be updated to show the correct content when you have located and solved the problem. In some of the Word add-ins I have developed, I have made tools that can detect and correct some types of field errors. This is true for the add-ins DocTools CrossReferenceManager and DocTools DocPropertyManager. |
Alt+F9 |
Toggles between showing field codes and field results of all fields in the entire document. |
The field result is the content displayed in the final document. The field codes instruct Word in what to display. Below is an example of a field showing field result and field code:
|
Shift+F9 |
Toggles between showing field codes and field results of selected fields only. |
If you need to see or modify the field code in a single or a few fields only, it is often practical to only show field codes of that/those fields. You may experience that nothing happens when you press Shift+F9. This may depend on where the selection is. You can then either try to adjust the selection or you can use Alt+F9. Alternatively, right-click and select Toggle Field Codes from the context menu — the same command as executed by the Shift+F9 shortcut. NOTE: To toggle the fields code of a single field, you do not need to select the entire field. It is sufficient that the cursor be in the field. |
Ctrl+F9 |
Inserts a set of field brackets (an empty field), ready for manually adding the relevant field code. |
Any Word field is enclosed in a set of field brackets. You can insert nested fields, i.e. fields inside fields. The field brackets look like curly parenthesis as in the REF field shown above. Note, however, that the field brackets cannot be typed as normal characters. You must use Ctrl+F9. You can insert fields via the Field dialog box but it is often faster to create fields manually if you know the precise field code syntax. Character codes for the field brackets: The curly brackets you can type using the keyboard have character codes 123 and 125, respectively. |
Ctrl+Shift+F9 |
Converts selected fields to normal text. The field result of each field is preserved but the field itself is removed. This is also referred to as unlinking fields. |
You may want to convert fields to normal text in special situations. For example, this may be useful if you need to copy content with fields to a destination where the fields will fail because there is no longer access to required data such as cross-reference fields that refer to targets that are not included in the copied range. An alternative solution is to lock fields that are to be prevented from updating (see below). NOTE: There is no command in the Word user interface to unlink fields. You must either use the shortcut or use code. The following VBA code will unlink all fields in the selection: Selection.Fields.Unlink |
Ctrl+F11 |
Locks selected fields, thereby preventing the field results from changing even if you update fields. |
There may be situations when you want to prevent the result of a field from being updated. Note that a locked field preserves its field result (the content shown in Word) even if you have made manual changes to the field result by modifying it directly. If a field is not updated as expected, the problem may be that the field is locked. You can unlock locked fields. See below. NOTE: You cannot see on a field whether it is locked. You can check via VBA whether fields are locked. The following VBA code will return True if the first field in the selection is locked: Selection.Fields(1).Locked NOTE: There is no command in the Word user interface to lock fields. You must either use the shortcut or use code. The following VBA code will lock all fields in the selection: Selection.Fields.Locked = True |
Ctrl+Shift+F11 |
Unlocks selected fields. |
Locked fields will work as normally in relation to field updating once they are unlocked. NOTE: There is no command in the Word user interface to unlock fields. You must either use the shortcut or use code. The following VBA code will unlock all fields in the selection: Selection.Fields.Locked = False |
Recommendation — turn on field shading so you can distinguish fields from other content
Since the result of a Word field is determined by the field code and is often influenced by content elsewhere, it is important to be able to distinguish fields from normal text so you don’t accidentally change a field result by manually modifying its result. If you manually modify a field result, the change will disappear the next time the field is updated unless the field has been locked.
Therefore, I recommend that you set the Word option for Field shading to Always (File > Options > Advanced > Show document content group > Fields shading > Always). When field shading is set to Always, all fields are shown with gray shading on the screen as in the examples in the table above. The gray shading is only visible on the screen in Word — it does not print and it is not visible in PDF.
Related information
Learn the rules that apply to updating fields of different types in Word in the article Updating Fields in Word — How it Works.
See the Microsoft article List of field codes in Word for information about the individual types of Word fields, their syntax and how to use them.
In case of problems with cross-reference fields not being updated as expected, see my article Cross-reference Problems — Troubleshooting.
Asked by: Rosella Gulgowski
Score: 4.8/5
(42 votes)
To toggle all the fields in your document, press Alt + F9. So if you open a document and see field codes instead of results, simply press Alt + F9 to toggle them all.
How do I toggle merge fields in Word?
To toggle all of the merge fields in a document, press Alt+F9. Merge fields can be nested and to enclose existing merge fields within a new merge field, select the existing merge field and press Ctrl+F9.
How do I toggle field codes in Word for Mac?
option-F9 (also known as alt-F9), or fn-option-F9/fn-alt-F9 toggles fields between «field code view,» where you see all the { }, and field results view.
How do I change the toggle field code in Word?
To update a single field, select it (or click anywhere in it) and press F9, or right-click the field and choose Update Field. If you have toggled the display of the field code string on, updating the field toggles it back to displaying the results.
How do I fix toggle fields in Word 2010?
Click the Office button and select «Word Options» to turn off field codes by default. Select the «Advanced» tab in the «Word Options» window. Scroll to the «Show document content» section. Deselect «Show field codes instead of their values» and click «OK.»
37 related questions found
What does Ctrl F9 do?
Ctrl+F9: Minimizes a workbook window to an icon. F10: Turns key tips on or off. (Pressing Alt does the same thing.) Shift+F10: Displays the shortcut menu for a selected item.
How do I permanently toggle field codes in Word?
To toggle between the field code and its resulting value, select the entire field and press Shift + F9. To toggle all the fields in your document, press Alt + F9. So if you open a document and see field codes instead of results, simply press Alt + F9 to toggle them all.
What is a field code?
Field codes are one of Microsoft Word’s key elements, frequently used by many users. If you have ever inserted a date or a page number to a document, you have used a field code.
How do I change field codes?
- Right-click the field, and then click Edit Field.
- Do one of the following: If Field properties and Field options are displayed, select the formatting options that you want. If only the field code is displayed, click Options, and then select the formatting options that you want.
How do I get rid of toggle field codes in Word?
Right-click, then click Toggle Field Codes. Press CTRL+SHIFT+F9 on your keyboard. This will remove the field codes, replacing them with the text they contained.
How do you display field codes?
If some or all of your fields show the field codes, you can display the values of all the fields by pressing Ctrl + A to select all the text in your document, right-clicking anywhere on the text, and selecting Toggle Field Codes from the popup menu.
How do I show merge fields in Word for Mac?
Go to the » Insert» tab and select «Field». Choose (All) with «Categories». Then select «MergeField» under «Field names» and type the field code behind the word MERGEFIELD in the text box. The MergeField is inserted in the Word document.
How do you use field codes?
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.
How do I show merge fields?
Right-click on the Merge Field in question. From the Word pop-up menu, select Toggle Field Codes. Or, to show all the Merge Fields as code in your Word document, click Alt+F9. When you toggle the Word Field Code, if it shows a different Merge Field, this is the value that will be pulled in.
How do I show all merge fields in Word?
To toggle all of the merge fields in a document, press Alt+F9.
How do I show merge field codes?
Press [Alt] + F9 to reveal the field coding. Or, right-click on the mail merge field and choose the Toggle Field Code option. You should now see the actual field code for the field which should look something like { MERGEFIELD Amount }.
Where is the field dialog box in Word?
To take advantage of fields, you use the Field dialog box. To summon this dialog box, click the Insert tab, and then choose Explore Quick Parts→Field. The Explore Quick Parts button is found in the Text group. The left side of the Field dialog box contains scrolling lists of categories in the Field Names list.
How do I update all fields?
Update all fields in a document
- Press Ctrl + A.
- Press F9.
- If your document has tables with fields or formulas, you might need to select each table separately and press F9.
How do I edit a field?
Open a form in the form editor and below the Field Explorer click New Field to create a new field. For any field already added to the form you can double-click the field to display the Field Properties. On the Details tab, click Edit.
How do I create a field code in Word?
Inserting custom document property fields
- Click the Insert tab in the Ribbon and then click Quick Parts in the Text group. …
- Select Field. …
- In the list of Field names on the left, select DocProperty.
- Under Field properties, select a property name.
- To view the codes for a field in the Field box, click Field Codes.
What is a field code database?
Searching in a database using different fields can be a powerful way to narrow your results. A field is a specific part of a record in a database. Common fields that can be searched are: author, title, subject, and abstract. Multiple fields may be combined using Boolean operators. …
Why is word showing field codes?
If you see field codes showing repeatedly, check your word processor settings for displaying fields. In Word for Windows, open Word Options, then choose “Advanced” and uncheck the “Show field codes instead of their values” box.
What is field shading in Word?
For this reason, Microsoft Office Word offers a field shading feature that helps users find fields in their files quickly. Simply select a field or move the insertion point into a field, Word application highlights the entire field or result of the field.
How do I view fields in Word?
Press Alt+F9. This makes all the field codes in your document visible, instead of the results of those fields. Choose Find from the Edit menu, or simply press Ctrl+F. Word displays the Find dialog box.
How do I find locked fields in Word?
You can do this by selecting the field and press Ctrl+F11. This «locks» the field so it does not update from its current value.
on
September 8, 2021, 8:17 AM PDT
3 ways to enter fields in Microsoft Word
Microsoft Word fields house instructions that help you create dynamic content; they’re flexible and powerful, if you know how to use them.
We may be compensated by vendors who appear on this page through methods such as affiliate links or sponsored partnerships. This may influence how and where their products appear on our site, but vendors cannot pay to influence the content of our reviews. For more info, visit our Terms of Use page.
Occasionally, a requirement simply can’t be easily met with the built-in features. Microsoft Word fields are similar to little bits of code that have a specific job. They return values that you can’t easily do in Word any other way. Fortunately, they’re easy to use once you get the hang of entering them properly. In this article, I’ll show you three ways to enter a Word field:
- Use the interface
- Ctrl + F9
- Type and convert
I’m using Microsoft 365 on a Windows 10 64-bit system, but you can use earlier versions. Word fields aren’t supported by Word Online; the original values will display, but they won’t update, nor can you enter them.
SEE: 83 Excel tips every user should master (TechRepublic)
About Word fields
You can insert fields to display content that will change when you update those fields. You might not realize it, but you’re already using fields. Page numbers, merge fields and so on are inserted automatically when you use those features.
You’ll notice as you work your way through the quick examples, that the function key, F9, plays a big part when working with fields. Specifically, here’s what this key does:
- Ctrl + F9 enters a blank field.
- Alt + F9 toggles all the fields in the document.
- Shift + F9 toggles the selected field.
In addition to entering and toggling fields, you can modify them using switches. A switch is an additional bit of information; it always starts with a backslash (). Switches add formats and change the field’s behavior a bit. We won’t include switches in this article, but you’ll want to explore them later.
When you enter a field, the underlying field code will use the following syntax:
{ FIELD NAME Properties Optional switches }
See Table A for an explanation of these elements.
Table A
FIELD TYPE | This is the name of the code and determines what the field does. You’ll often see this part in all uppercase letters, but it isn’t case sensitive. |
Properties | Optional instructions, but not all fields have them. In the interface dialog that you’ll see in the next section, these are referred to as Field Properties. |
Switches | These are specific instructions, often to do with formatting that you can enable or disable. The character always denotes a switch. |
When including fields in a document, remember that anyone viewing the document in Word can view the underlying codes, so be careful about including personal or confidential information. I’ve never run into this situation but it’s worth noting.
Now that you have a good feel for what fields are, let’s start inserting them. We’ll begin with the interface method.
How to insert a Word field using the interface
Word’s interface provides the most comprehensive method for inserting fields. Even if you find another method easier, I encourage you to review the interface so you can learn what fields are available and about their switches.
SEE: Windows 10: Lists of vocal commands for speech recognition and dictation (free PDF) (TechRepublic)
To enter a field using the interface, do the following:
- Position the cursor where you want to insert the field, which can be in the document body, or the header or footer.
- Click the Insert tab and then click the Quick Parts dropdown in the Text group.
- From the dropdown, choose Fields (Figure A).
- The resulting dialog lists the Word fields in the Field Names list, which you can filter using the Categories list. For this simple example, select Author and then select First Capital in the Format list as shown in Figure B.
- Click OK, and you’ll see the author’s name in the document (Figure C).
Figure A
Figure B
Figure C
You may have noticed a few other options in the dialog:
- Field Codes will display the underlying field code.
- Options will display formatting options and other specialized options that are specific to the field.
- Preserve Formatting During Updates does just what it says: it preserves formatting.
You’ll want to explore the list of fields and their many options when you have more time.
You can use the interface to nest fields. After choosing one field, move the cursor inside that field and then return to the list and choose the second field. This capability takes a bit of practice. In fact, many users find it easier to enter a nested field manually.
How to insert a Word field by typing and converting
Perhaps the easiest method to enter any field is to simply type it, select it and then press Ctrl + F9. Doing so converts the text to the field(s). Let’s try this with again, the Author field:
- Position the cursor where you want to insert the field.
- Type Author
- Select the text you just typed (Figure D).
- Press Ctrl + F9 to convert the string into a true field. As you can see, Word adds the brackets.
- To display the field value instead of the field, press F9.
Figure D
This is a quick and easy way to enter a single field when you know the field code and any switches you might want to include. You can also use this method to insert a nested field, but you must insert each individually. You can’t type out an entire string and convert all the fields at once.
How to insert a Word field by using Ctrl + F9
The third method is similar to the previous method. Press Ctrl + F9 to insert a pair of empty brackets and then type the field code and any switches. Let’s try this method with the same { Author } field:
- Position the cursor where you want to insert the field.
- Press Ctrl + F9 to enter a blank field, as shown in Figure E.
- Enter the field code Author inside the brackets and press F9 to calculate the result.
Figure E
Word displays a field’s results rather than the field code, by default. Right-clicking serves as a toggle to display the underlying field code instead of its result. Doing so converts only the one field, so this is an easy way to quickly edit only one field.
For a full list of field codes, visit List of field codes in Word.
Also See
-
How to make fewer mistakes and work more efficiently using predictive text in Microsoft 365
(TechRepublic) -
How to use the many text wrapping options in Microsoft Word
(TechRepublic) -
Microsoft 365: A cheat sheet
(TechRepublic) -
Zoom vs. Microsoft Teams, Google Meet, Cisco WebEx and Skype: Choosing the right video-conferencing apps for you (free PDF)
(TechRepublic) -
Checklist: Securing Windows 10 systems
(TechRepublic Premium) -
Must-read coverage: Windows 10
(TechRepublic on Flipboard)
-
Microsoft
-
Software