Troubleshooting – Word Fails to Show Font Name and Other Formatting Values – Shows Blank Fields
You may sometimes need to find out whether your text or part of it is formatted with the same font, font size, paragraph style or other formatting properties. This can be as easy as selecting the text in question and checking which values Word shows for the properties in question. But it may not always work as you want or expect.
This article explains the rules that apply to the way Word shows or does not show formatting information. You will also find suggested solutions plus a macro that can automatically perform the check for you, also when Word fails to do so.
Summary of rules -
when does Word show formatting values and when not?
If you are only interested in the rules that apply to Word’s display of formatting property values for selected text - without all the details - here they are:
Rules no. 3 and 4 are based on the results I have found by testing. Microsoft has confirmed that it works that way "by design".
Read on for more details about how it works.
About paragraph and character formatting
When talking about formatting of text in Word, you will often need to distinguish between formatting of entire paragraphs and formatting of characters.
Any paragraph in a Word document is applied a paragraph style (paragraph formatting). On top of the paragraph style, the entire paragraph or part of it may be applied a character style (character formatting). Paragraph and character formatting may also be applied as direct formatting by selecting text and applying special formatting to the selection.
There are several places in Word where you can see which paragraph and character property values have been applied to the selected text. Examples are the Font field and the Font Size field on the Home tab and the information in the Paragraph and Font dialog boxes. The Paragraph dialog box lets you set paragraph properties. The Font dialog box lets you set character properties.
The rules that apply to Word’s display of formatting property values - details
According to my testing, the four rules below apply to the way Word displays paragraph and character formatting values.
The rules seem to apply to all versions of Word. I have tested in Word 2003, Word 2007, Word 2010, Word 2013, and Word 2016 / Word for Microsoft 365.
No doubt that the described behavior makes it more difficult to check the formatting in some situations. But then the macro you can download from this page may be useful.
See Figure 3, Figure 5, and Figure 7 below.
See also the comments about theme fonts below Figure 7.
See Figure 4 and Figure 6 below.
For example, the font name Calibri will be shown in the Font field on the Home tab if all text in the selection is formatted with the font Calibri. But the Font field will be blank if different fonts are used.
However, the general rules above do not always apply. There are more rules.
This is true even if the selection has been applied the same paragraph property value (e.g. the same paragraph style or the same line spacing). The display of values stops as soon as any part of paragraph 50 is included in the selection.
See Figure 4 below.
Note that VBA also returns a blank string or another undefined value if checking a paragraph formatting property of a selection that includes more than 49 paragraphs. The display of values stops as soon as any part of paragraph 51 is included in the selection.
Example - checking the following VBA-code in the macro editor:
Selection.Range.ParagraphFormat.Style
will return an empty string instead of a paragraph style name if more than 49 paragraphs are selected.
It does not matter whether all of or some of the selected paragraphs are in e.g. a table. It is the total number of paragraphs that are partly or fully included in the selection that matters. For more details, see How word counts selected paragraphs - special cases and oddities below.
See Figure 1-2 below for illustrations of the display results with 49, 50, and 51 selected paragraphs, respectively.
This is true even if the selection has been applied the same character property value (e.g. the same font or the same font size).
See Figure 6 below.
Note that VBA also returns a blank string or another undefined value if checking a character formatting property of a selection that includes more than 50 paragraphs.
Example - checking the following VBA-code in the macro editor:
Selection.Font.Name
will return an empty string instead of a font name if more than 50 paragraphs are selected.
It does not matter whether all of or some of the selected paragraphs are in e.g. a table. It is the total number of paragraphs that are partly or fully included in the selection that matters. For more details, see How word counts selected paragraphs - special cases and oddities below.
See Figure 1-2 below for illustrations of the display results with 49, 50, and 51 selected paragraphs, respectively.
Illustrations of paragraph and character values you will see depending on the number of selected paragraphs
Figure 1. (1), (2), and (3) shows 49, 50, and 51 selected paragraphs, respectively. The gray color shows the selection. In Figure 2 below you will see examples of which information Word displays.
Figure 2. (1), (2), and (3) relate to the corresponding numbers in Figure 1 above and illustrate what Word displays in Style, Font, and Font Size fields that have been added to the Quick Access Toolbar (QAT). Note that the results comply with the rules described above: Style is a paragraph property in this case (the selected paragraphs have not been applied a character style in this case) - it shows no values if more than 49 paragraphs are selected (rule no. 3). Font and Font Size are character properties - they show no values if more than 50 paragraphs are selected (rule no. 4).
Special case: If the entire selection had been applied a character style on top of the paragraph style, the Style field would have shown the name of the character style instead of the paragraph style. Since Word's limit for showing character properties is 50 (rule no. 4) and not 49 (rule no. 3), such character style name would have been shown in (2) above (50 paragraphs selected) instead of a blank Style field.
Illustrations of paragraph property display in the Paragraph dialog box
Figure 3. Paragraph dialog box showing all values. See rule no. 1 above.
Figure 4. Paragraph dialog box showing blank and grayed out values only. See rules no. 2 and 3 above.
Illustrations of character property display in the Font dialog box
Figure 5. Font dialog box showing all values. See rule no. 1 above.
Figure 6. Font dialog box showing blank and grayed out values only. See rules no. 2 and 4 above.
Figure 7. Special case of font value in the Font dialog box. Note that the Font field shows +Body and note the text marked by orange near the bottom of the dialog box. See the explanation below.
Font inherited from theme versus font set directly
The Font field on the Home tab shows the font name followed by (Body)or (Headings) in those situations, for example Arial (Body).
Example: The theme font for Body Text is Arial. Two paragraphs are selected, one that uses the font from the theme and shows Arial (Body) in the Font field and one that has been applied the font directly and shows Arial in the Font field. When selecting both paragraphs, the Font field will not be blank but show the font name from the topmost of the two paragraphs. See Figure 8 below.
The following VBA code will return Arial in both situations:
Selection.Font.Name
Figure 8. Value in Font field if both theme font and non-theme font is used in selection. The gray color shows the selection.
What you can do if you see blank formatting property values -
incl. macro solution
Solution 1 - select fewer paragraphs at a time
If blank formatting property values are caused by the number of selected paragraphs exceeding the limits of 49 or 50 as described in rules no. 3 and 4 above, try to change the selection so it includes fewer paragraphs. Perform the checks you need. Change the selection to include the next chunk of paragraphs and repeat the checks as many times as needed.
If you have not selected more than 49 paragraphs, a blank field, a grayed out check box or (No color) indicate that the selection does include mixed formatting property values.
See also How word counts selected paragraphs - special cases and oddities below.
Solution 2 - use a macro to check the formatting
I have created a macro you can use to check the selection for the following three formatting properties:
The macro works on any number of paragraphs. Note however, that the more paragraphs you have selected, the longer the check may take. It should take only a few seconds to check e.g. 100 paragraphs.
Figure 9. The dialog box that opens when you start the macro.
The macro is not meant to cover everything but it may help you in your work.
The main purpose of the macro is to make it easy to detect whether or not the same font, font size, and/or paragraph style have been applied to the entire selection. As rules no. 3 and 4 tell, Word will not provide that information if your selection includes more than 49 or 50 paragraphs.
The macro compares the font name, font size, and paragraph style of each paragraph in the selection with the values applied to the start of selection. A message shows the resulting values when finished.
See the examples below.
Figure 10. Example of final result after running the macro - identical formatting property values were found in the entire selection.
Figure 11. Examples of final result after running the macro - mixed formatting property values were found in the selection.
More details and considerations about the macro
The macro
Below, you will find the macro code. If you need help on installing macros, see How to install a macro.
How word counts selected paragraphs - special cases and oddities
The Word Count dialog box does not include all selected paragraphs in the count but VBA counts all paragraphs
There are some oddities when it comes to the count of paragraphs Word shows in the Word Count dialog box.
If you check the number of selected paragraphs in the Word Count dialog box and compare it with the number found via VBA, you will see that Word does not always show the same result.
IMPORTANT: The limits of 49 and 50 paragraphs described in rules no. 3 and 4 above are based on all paragraphs in the selection being counted, i.e. the number that will be returned when using the following VBA code:
Selection.Paragraphs.Count
About special paragraphs in tables
If you turn on formatting marks (Ctrl+Shift+8) in Word, a paragraph will, in general, end with a Pilcrow Sign, ¶. But tables are special as described below.
Types of paragraphs that are ignored by the Word Count dialog box
Some types of paragraphs seem to always be ignored in the count of paragraphs shown in the Word Count dialog box. I have found the following rules:
As mentioned above, VBA counts all paragraphs.
The illustrations below show examples of the different results of paragraph count in the Word Count dialog box and in VBA.
VBA result in this example:
Selection.Paragraphs.Count = 6
Figure 12. Word and VBA results - counting selected paragraphs - empty table cells. The gray color shows the selection.
VBA result in this example:
Selection.Paragraphs.Count = 6
Figure 13. Word and VBA results - counting selected paragraphs - including a cell with a single paragraph. The gray color shows the selection.
VBA result in this example:
Selection.Paragraphs.Count = 7
Figure 14. Word and VBA results - counting selected paragraphs - including a cell with two paragraphs but only one with text. The gray color shows the selection.
Related information
See About VBA Macros and Code Snippets and How to Install a Macro for misc. information that may help you in your work with macros and for information about how to install macros.