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:

  • RULE NO. 1
    In general, Word will show a specific paragraph or character property value as long as the same value applies to the entire selection.
  • RULE NO. 2
    In general, a blank field, a gray check box or the text (No color) in a color field indicate that different formatting property values have been applied to different parts of the selection.
  • RULE NO. 3
    Word stops showing paragraph formatting property values when the number of selected paragraphs exceeds 49.
  • RULE NO. 4
    Word stops showing character formatting property values when the number of selected paragraphs exceeds 50.

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 Office 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.

  • RULE NO. 1
    In general, Word will show a specific paragraph or character property value as long as the same value applies to the entire selection.

See Figure 3, Figure 5, and Figure 7 below.

See also the comments about theme fonts below Figure 7.

  • RULE NO. 2
    In general, a blank field, a gray check box or the text (No color) in a color field indicate that different formatting property values have been applied to different parts of the selection.

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.

  • RULE NO. 3
    Word stops showing paragraph formatting property values when the number of selected paragraphs exceeds 49.

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.

  • RULE NO. 4
    Word stops showing the character formatting property values when the number of selected paragraphs exceeds 50.

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

49, 50, and 51 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.

The displayed style, font and font size info

Figure 2. (1), (2), and (3) relate to the corresponding numbers in Figure 1 above and illustrate what Word displays in StyleFont, 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

Paragraph dialog box showing all values

Figure 3. Paragraph dialog box showing all values. See rule no. 1 above.

Paragraph dialog box showing blank and grayed out values only

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

Font dialog box showing all values

Figure 5. Font dialog box showing all values. See rule no. 1 above.

Font dialog box showing blank and grayed out values only

Figure 6. Font dialog box showing blank and grayed out values only. See rules no. 2 and 4 above.

Special case of font value in the Font dialog box

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

  • +Body is shown for text with outline level Body Text if the font in use is based on the document’s theme font for Body Text. Correspondingly, +Headings is shown for text formatted with e.g. one of the built-in Heading 1-9 styles if the font in use is based on the document’s theme font for Headings.

The Font field on the Home tab shows the font name followed by (Body)or (Headings) in those situations, for example Arial (Body).

  • When it comes to the display of a font property value, Word will consider a specific font to be the same no matter whether or not it is inherited from a theme. This means that the Font field will not be blank even if the selection contains a mixture of the two.

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.

Font name with and without (Body)

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:

  • Font name
  • Font size
  • Paragraph style

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.

The dialog box that opens when you start the macro

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.

  • If a value is the same for the entire selection, the exact value will be shown.
  • If a value deviates, [Mixed values] will be shown. Extra information will be shown if the selection includes tables and/or shapes.

See the examples below.

Example of final result after running the macro - identical formatting property values were found in the entire selection

Figure 10. Example of final result after running the macro - identical formatting property values were found in the entire selection.

Examples of final result after running the macro - mixed formatting property values were found in the 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 includes comments that explain what is going on.
  • The macro could be extended to check for more formatting properties.
  • It might seem smarter and faster to check the selection in chunks of 49 paragraphs at a time instead of checking each individual paragraph. However, since the initial selection to be checked may contain all kinds of content, this could cause problems.

How to get the macro

Click the link below to open a window with the macro code:

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.

  • Word ignores some types of selected paragraphs in the result shown in the Word Count dialog box. The main principle is that that the dialog box counts only paragraphs that are visible when formatting marks are turned off. However, see the details below.
  • All selected paragraphs are counted when checking via VBA.

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.

  • All table cells end with an end of cell marker that includes a paragraph mark.
  • All table rows end with an end of row marker that includes a paragraph mark.
  • When checking via VBA, both an end of cell marker and an end of row marker consists of two characters: Chr(13) + Chr(7). Chr(13) is a normal paragraph mark. Even if you turn on formatting marks, you will not see those special paragraph marks as Pilcrow Signs, ¶. They are invisibly included in the marker which appears as a Currency Sign, ¤.

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:

  • Empty paragraphs, i.e. paragraphs that consist of a paragraph mark only (may include non-printing characters like spaces and tabs too), are not included in the paragraph count in the Word Count dialog box.
  • Empty end of cell marker paragraphs in tables, i.e. paragraphs that consist of an end of cell marker only (may include non-printing characters like spaces and tabs too), are not included in the paragraph count in the Word Count dialog box.
  • If the selection includes the last paragraph in the document. that paragraph is not included in the paragraph count in the Word Count dialog box even if the paragraph contains text or other content.
  • End of row marker paragraphs are not included in the paragraph count in the Word Count dialog box.

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.

Word and VBA results - counting selected paragraphs - including a cell with a single paragraph

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.

Word and VBA results - counting selected paragraphs - including a cell with two paragraphs but only one with text

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.