

The SelectCurrentFont method extends the current selection until there is a change in either the font (typeface) or the font size. If you simply want to find the next occurrence of a font change, then the following very short macro is quite handy: The longer the document, the longer the macro takes to complete its work. Because the macro checks each character in the document individually, you may need to be patient while it is running. It then checks to make sure that what you enter matches one of the fonts available in the system. One of the nice features of this macro is that it prompts you for the font that you find acceptable. ' Highlight the selected range of text in yellowĬ.FormattedText.HighlightColorIndex = wdYellow ' if the character's font doesn't match the OK font ' Checks each character in the document, highlighting SPrompt = sPrompt & "any fonts available to the " SPrompt = "The font name as typed does not match " ' Terminates the loop if the name of the font is invalid ' changed to 'Times New Roman' (application version) ' Example: 'times new roman' (user-typed) is ' the version recognized by the application ' Changes the user-typed name of the font to ' Verifies that the name of the font is valid SFontName = InputBox(sPrompt, sTitle, sDefault) SDefault = ActiveDocument.Styles(wdStyleNormal).Font.Name SPrompt = sPrompt & "have in the document." SPrompt = "Type the name of the font that is OK to " ' Gets the name of the font as typed by the user The following macro highlights the offending characters in yellow: Pay particular attention to capitalization.)Īnother approach is to simply check each character in the document and highlight the character if it doesn't use your desired font. (You'll want to use the font name exactly as it appears in the list of fonts usable by Word. The only thing you'll need to do to make the macro work in your case is to change the desired font name on two lines. If the font used for a word doesn't match what you want, then the routine changes the font. The following is a short little macro that looks at the font used for each word in your document: If you prefer, you can use a macro to modify the font used in the document. What you end up with is only the text that is not Times Roman formatted with the stand-out formatting. Then use Find and Replace to find all instances to Times Roman (see the steps above) and replace it with Times Roman without the stand-out formatting you previously applied. Select the whole document ( Ctrl+A) and apply that formatting to the whole document. Just figure out some formatting that you are not using in the document, such as double underlines or red text. You could also use Find and Replace to apply some stand-out formatting to text that isn't in Times Roman font. You can easily scroll through the document to see what isn't highlighted-these are the "anomalies" you are seeking. Click the Highlight All Items check box.Īt this point, the dialog box closes and Word dutifully highlights all instances of Times Roman in your document.The font specifications you are looking for appear just below the Find What box. You don't have to specify any other settings unless you want to.) Use the controls in the dialog box to specify that you want to find the Times Roman font you are using.Click the More button, if it is available.Word displays the Find tab of the Find and Replace dialog box.

First, you could use Find and Replace in this manner: There are a couple of ways that you can go about finding what you need and, potentially, fixing the problem. She'd like to easily find those "formatting anomalies." Hilary wonders if there is a way to search a document for text that is not using a particular font. However, once in a while someone will edit a document and apply a different font to some of the text it contains. Hilary notes that most of the documents their company uses are standardized on a Times Roman font.
