Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Highlighting Duplicate Words.

Highlighting Duplicate Words

Written by Allen Wyatt (last updated June 26, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


1

Joe is an author and he has some ideas for using Word macros to help with his proofreading. One of the macros he wants to build is for finding duplicate words in sentences and paragraphs. He wants to exclude the common necessary words like "the," "a," etc. Joe would like to highlight the duplicate words in a document so he can examine their use and make appropriate changes.

How you go about this depends, really, on how you want to approach the task. For instance, if you want to simply look for duplicate words that are side-by-side, then Word should do that already for you; the grammar checker takes care of marking those duplicate words.

If you, instead, want to find excessive instances of a particular word, then you can use Find and Replace to highlight them. On the Find tab of the Find and Replace dialog box you can enter the word you want to highlight, click the Highlight All Items check box, and then click Find All. Word selects all instances of the Word and you can then use the Highlighter tool to highlight all of them.

Finally, if you want a macro that will step through each paragraph of the document (or each sentence of a document) and look for multiple instances of any given word, then that is a much more complex issue. Stepping through either paragraphs or sentences is not a huge problem; just use either the Paragraphs collection or the Sentences collection in the macro. The bigger problem is dealing with text variations. For instance, does the word "dog" match the word "dogs" or, even, the word "dogged." Without a firm understanding of what, exactly, you want to consider as "matching," your macro can get rather cumbersome.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13218) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Highlighting Duplicate Words.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Grouping Drawing Objects

Drawing objects are easily added to a document. You can group these objects so they are easier to manage by following the ...

Discover More

Using Print Preview

The Print Preview feature can be a great way to see how something will look on paper without actually using any paper. ...

Discover More

Running Macros on Hidden Worksheets

Excel allows you to hide worksheets so that they aren't visible to those using your workbook. Hiding worksheets has a ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Transposing Two Paragraphs

Need to swap two adjacent paragraphs? Your editing arsenal can include a command to do this if you use the macro in this tip.

Discover More

Using Go To with a Percentage

Need to jump a certain percentage of the way through a document? You can do it using the familiar Go To tab of the Find ...

Discover More

Controlling Overtype Mode

Some people like to have Word replace previous information as they type; this is called 'overtype mode.' You can control ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

2021-06-26 10:13:43

Nick Wright

You can do this with the StyleWriter Professional edition without any programming skills.

Just highlight the paragraph - or any text - and run the program. The Editor's List All Words column shows you the number of times you've used a word, excluding the 200 most common in the language.

(see Figure 1 below)


Nick Wright
Editor Software

Figure 1. The All Words Editor's List


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.