Adding a Group of Words to the Custom Dictionary

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


Santhosh would like a way to select some words and have them added to the custom dictionary. He knows he can do it one word at a time, if the word is incorrectly spelled, but he would like to have them all added at once.

There a couple of ways you can do this. First, you need to understand that the custom dictionary is nothing but a sorted text file. This means that it is possible to access and manipulate the file outside of Word. It is also important to remember that Word allows you to use multiple custom dictionaries.

That last point is a good place to start—you need to figure out what custom dictionary is being used in your Word installation. Follow these steps:

  1. Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 and later versions display the File tab of the ribbon and then click Options.)
  2. At the left side of the dialog box click Proofing.
  3. Click the Custom Dictionaries button. Word displays the Custom Dictionaries dialog box. (See Figure 1.)
  4. Figure 1. The Custom Dictionaries dialog box.

In the figure above, there is only one custom dictionary shown, but on your system, there could be more than one. (See Figure 2.)

Figure 2. The Custom Dictionaries dialog box showing more than one dictionary.

If your system has more than one custom dictionary, you need to figure out which one it is that you want to change. Select the custom dictionary (just click on it once), and notice that the path to the file is then shown in the File Path box. Jot down the path somewhere, as you may need it in a moment.

This brings up the first possible way of adding words to the custom dictionary. In the Custom Dictionaries dialog box, after you select a dictionary, click the Edit Word List button. Word should then display the following dialog box. (See Figure 3.)

Figure 3. Editing a custom dictionary.

Notice that the top box is labeled "Word(s)." This implies that you can put in a single word, or you can enter multiple words. The single-line size of the box, however, leads you to believe that you can only insert a single word at a time.

Put the words you want to add into a program such as Notepad, one word per line. It doesn't really matter what order they are in, only that there is only a single word per line. Select them all and press Ctrl+C, then switch back to Word. Place the insertion point in the Word(s) box and press Ctrl+V. You may only be able to see a single word at a time, but you should be able to click the Add button, and all of the words are added to the dictionary. You can check this out by scrolling through all the words to see if the ones you added are included.

When you are done, you can close all the dialog boxes. That brings me to what I mentioned earlier—since the dictionary is nothing but a text file, you can edit it directly, outside of Word. This can be especially helpful if you have many, many words you want to add to the dictionary.

Close Word and grab the full path that you jotted down a little while ago. Open a Explorer window (Win+E) and navigate to the path. You can then use an editor such as Notepad to open the dictionary file and make any edits you want. As you make edits, there are only three things you need to remember:

  • There should be only a single word per line. (If there are spaces, it is not a single word.)
  • There should be no duplication in words.
  • The words need to be sorted in ascending alphabetic order.

When you save out the edited text file, then you can restart Word and the dictionary should work just fine.

Of course, the two editing methods described so far anticipate that you will prepare a list of words before you actually add them to the dictionary. Perhaps you, instead, would simply like to select words within a document and have them added. For this need, a macro is the best way to go. Here's an example of one that you could use:

Sub AddWordsToCustomDictionary()
    Dim sRaw As String
    Dim sWords() As String
    Dim sWord As String
    Dim sFile As String
    Dim sMsg As String
    Dim ignoredWords As Collection
    Dim addedWords As Collection
    Dim totalProcessed As Integer
    Dim J As Integer

    ' Ensure something is selected
    If Selection.Type = wdNoSelection Then
        MsgBox "Please select some text before running the macro."
        Exit Sub
    End If

    ' Find path to active custom dictionary
    sFile = Application.CustomDictionaries.ActiveCustomDictionary.Path
    sFile = sFile & Application.PathSeparator
    sFile = sFile & Application.CustomDictionaries.ActiveCustomDictionary.Name

    sRaw = Selection.Text
    ' Replace common punctuation marks with spaces
    sRaw = Replace(sRaw, ".", " ")
    sRaw = Replace(sRaw, ",", " ")
    sRaw = Replace(sRaw, ";", " ")
    sRaw = Replace(sRaw, ":", " ")
    sRaw = Replace(sRaw, "\"", " ")
    sRaw = Replace(sRaw, "/", " ")
    sRaw = Replace(sRaw, "'", " ")
    sRaw = Replace(sRaw, Chr(34), " ")
    sRaw = Replace(sRaw, "?", " ")
    sRaw = Replace(sRaw, "!", " ")
    sRaw = Replace(sRaw, vbCr, " ")
    sRaw = Replace(sRaw, vbLf, " ")
    sRaw = Replace(sRaw, vbTab, " ")

    ' Split into words
    sWords = Split(sRaw)

    ' Initialize collections
    Set ignoredWords = New Collection
    Set addedWords = New Collection

    totalProcessed = 0

    For J = 0 To UBound(sWords)
        sWord = Trim(sWords(J))
        If sWord <> "" Then
            totalProcessed = totalProcessed + 1
            If Application.CheckSpelling(sWord) Then
                ignoredWords.Add sWord
            Else
                Open sFile For Append As #3
                Print #3, sWord
                Close #3
                addedWords.Add sWord
            End If
        End If
    Next J

    ' Create result message
    sMsg = "Total words processed: " & totalProcessed & vbCrLf & vbCrLf
    sMsg = sMsg & "Words in dictionary (" & ignoredWords.Count & "): " & vbCrLf
    For Each sWord In ignoredWords
        sMsg = sMsg & sWord & ", "
    Next sWord
    sMsg = sMsg & vbCrLf & vbCrLf
    sMsg = sMsg & "Words added to dictionary (" & addedWords.Count & "): " & vbCrLf
    For Each sWord In addedWords
        sMsg = sMsg & sWord & ", "
    Next sWord
    sMsg = sMsg & vbCrLf

    ' Show the result
    MsgBox sMsg, vbInformation, "Dictionary Update Summary"
End Sub

Understand that a macro such as this is just a starting point. It doesn't include some options that may be beneficial, such as error handling. It basically puts together a list of words in the sWords array, checks each one to see if it is in the dictionary already, and then adds the words if the word is not.

One final note of caution: There have been reports that updating Word can result in the custom dictionary being wiped out. If your dictionary contains many specialized words, you may want to back it up. Do this by locating the dictionary, outside of Word, and then copying the file to a backup device such as another folder or a USB drive.

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 (11626) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365.

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

Using Object Anchors

An object anchor is used to signify the point at which an object is inserted into a document. If you want to see these ...

Discover More

Dealing with Long Formulas

If your worksheet formulas seem to go on forever, here's a handy way to make them more understandable. (All you need to ...

Discover More

Coloring Identical Company Names

Want to know where duplicates are in a list of names? There are a couple of ways you can go about identifying the ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!

More WordTips (ribbon)

Hiding Spelling Errors

When you are typing in a document, Word normally checks your spelling in the background, marking possible spelling errors ...

Discover More

Spellchecking Words with Superscripts

Adding a superscript to a word is necessary for many types of writing. Doing so, however, can confuse the spell checker ...

Discover More

Making Spell Check Ignore Characters

The rules of professional editing often require that editorial changes in a quote be noted with brackets. These brackets, ...

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 six less than 6?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.