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: Enforcing a Do-Not-Use Word List.

Enforcing a Do-Not-Use Word List

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


1

Rohan works for a company that is using a new method of writing letters involving a list of approximately a hundred 'complex' words that must never be used when writing. He is looking for the best way to be alerted if any of the words on the list are used in a document.

There are several ways that this can be accomplished, and the best choice will depend on how work is done in your office, along with personal preference. For instance, one simple way to handle the words is to add them to what Word calls your "exclude" dictionary. Basically, this is a way of modifying the files used by the spell checker so that a particular word is always marked as incorrectly spelled. If you add the hundred words to the exclude list, then they will always be marked as incorrectly spelled. How you add words to the exclusion dictionary has been covered in other issues of WordTips. You can find information here:

http://word.tips.net/T001037

Similar information is also available at the Word MVP site, here:

http://wordmvp.com/FAQs/General/ExcludeWordFromDic.htm

Another way you could approach your list is to create AutoCorrect entries for each of the words. When one of the words is typed, you could have it automatically replaced with a version of the word that is in some noticeable format that will call attention to the fact that the word was used. If you prefer, you could also simply have the word replaced with a space, which would mean that the offending word is automatically "erased" whenever it is typed.

There are also macro approaches that you could use. These would, primarily, be helpful to run at various points in the development of the document. The macro could do just about anything you decide it should do. For instance, it might simply collect the offending words that were found in the document and notify you that they were found, without actually making any changes. The following macro will do just that.

Sub DoNotUseList()
    Dim Word As Range
    Dim ForbiddenWords(2) As String
    Dim ForbiddenWord As Variant
    Dim BadList As String

    ' Populate array with forbidden words
    ' Remember to modify the size of the array above
    ForbiddenWords(0) = "cat"
    ForbiddenWords(1) = "dog"
    ForbiddenWords(2) = "mouse"

    BadList = "The following forbidden words have been identified:"
    For Each Word In ActiveDocument.Words
        For Each ForbiddenWord In ForbiddenWords
            If LCase(Trim(Word.Text)) = ForbiddenWord Then
                BadList = BadList & vbCrLf & ForbiddenWord
            End If
        Next
    Next

    MsgBox BadList, vbOKOnly, "Forbidden Words"
End Sub

To change the words that are on the forbidden list, simply change the size and contents of the ForbiddenWords array. You should make sure that there are no capital letters and no phrases in the array contents. When you run the macro, each of the words in the document is checked against each of the forbidden words, and you are notified at the end if there are any found.

Other similar macro-based ways to handle this type of problem have been presented in other issues of WordTips:

http://word.tips.net/T000502

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (521) 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: Enforcing a Do-Not-Use Word List.

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

Getting Rid of Old Windows Updates

Microsoft is constantly updating Windows for various reasons. For most people, those updates are downloaded and installed ...

Discover More

Using a Protected Worksheet

If you have a worksheet protected, it may not be immediately evident that it really is protected. This tip explains some ...

Discover More

Minimizing the Ribbon for a Document

Want the ribbon to be minimized for a particular document? Word may not allow you to get the exact result you want, as ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (menu)

Shortcut for AutoCorrect Dialog Box

There is no built-in keyboard shortcut that will display the AutoCorrect dialog box. This doesn't mean that there aren't ...

Discover More

Spelling Errors Resulting from Erroneous Spaces

Spelling errors can result from improperly ordering letters in a word, or from adding spaces where they shouldn't be. ...

Discover More

Toggling AutoCorrect Settings

If you need to turn AutoCorrect on or off, there is no built-in way to easily do it in Word. You can create your own ...

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 + 7?

2017-01-21 13:58:40

Steve Wells

The AutoCorrect method would work great for initially created documents. However, if you incorporate text from another contributor (or your own earlier work) that had not been processed with the appropriate AutoCorrect list, forbidden words might remain. I might accidentally attempt to reuse an old paragraph in which, say, a “zarf” had not triggered a “teacup” replacement.* For such situations, the exclusion list or macro approach would provide additional help.
* A zarf, a decorative metal handle for handle-less cups, is also used for coffee.

For example, in CAD work, I often had need to reuse text that might include “Autocad” as used by a writer unfamiliar with the product’s unusually cased spelling. I added “autocad” to my exclusion list and “AutoCAD” to a custom active “CAD” dictionary (with pline, polyline, xref, and other specialized terms). Any of the common case misuses (autocad, Autocad, AutoCad) were always flagged as spelling errors, and AutoCAD offered as a replacement.


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.