Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Highlighting Duplicate Words.

Highlighting Duplicate Words

Written by Allen Wyatt (last updated August 7, 2020)
This tip applies to Word 97, 2000, 2002, and 2003


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 (6957) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) 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

Superscript and Subscript at the Same Place

Do you want a superscript and subscript character to appear directly above each other without using the Equation Editor? ...

Discover More

Working with Elapsed Time

Work with times in a worksheet and you will eventually want to start working with elapsed times. Here's an explanation of ...

Discover More

Special Symbols Display Incorrectly

When sharing your documents with others, you may occasionally have a problem where some of the symbols used in your ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Non-breaking Em Dashes

Need an em dash to be "sticky" on both ends of the dash? Word doesn't provide such formatting, but there are a few ...

Discover More

Moving Text without Affecting the Clipboard

Want a quick and easy way to move text (or other document elements) from one place to another in your document? Check out ...

Discover More

Deletions Don't Work as Expected

We all get into habits, including in how we use Word. If you are used to deleting text in a particular way, and all of a ...

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 8 - 5?

2015-12-02 12:12:36

Julia

Very interesting page, I was wondering if anyone has a macro to look for duplication of exact words at sentence and/or paragraph level. If yes I would be interested in using it.


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon 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.