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: Counting Changed Words.

Counting Changed Words

Written by Allen Wyatt (last updated November 17, 2018)
This tip applies to Word 97, 2000, 2002, and 2003


3

Steven uses Track Changes in his documents all the time. He needs a way to count only the words that have been changed in a document—those affected by Track Changes.

If you are using an older version of Word (prior to Word 2003) there is a way to do this. In the Find box, if you press Ctrl+N, Word will find only "new" words...i.e., Tracked Changes. You could then replace these "words" with themselves (use ^& in the Replace With box) and get a count of the replacements.

If you are using Word 2003, this capability no longer exists because of the changes in how Word tracks and displays changes. In this case, you'll need to use a macro to display the desired information. The following is an example of a macro you could use:

Sub GetTCStats()
    Dim lInsertsWords As Long
    Dim lInsertsChar As Long
    Dim lDeletesWords As Long
    Dim lDeletesChar As Long
    Dim sTemp As String
    Dim oRevision As Revision
    
    lInsertsWords = 0
    lInsertsChar = 0
    lDeletesWords = 0
    lDeletesChar = 0
    For Each oRevision In ActiveDocument.Revisions
        Select Case oRevision.Type
            Case wdRevisionInsert
                lInsertsChar = lInsertsChar + Len(oRevision.Range.Text)
                lInsertsWords = lInsertsWords + oRevision.Range.Words.Count
            Case wdRevisionDelete
                lDeletesChar = lDeletesChar + Len(oRevision.Range.Text)
                lDeletesWords = lDeletesWords + oRevision.Range.Words.Count
        End Select
    Next oRevision

    sTemp = "Insertions" & vbCrLf
    sTemp = sTemp & "    Words: " & lInsertsWords & vbCrLf
    sTemp = sTemp & "    Characters: " & lInsertsChar & vbCrLf
    sTemp = sTemp & "Deletions" & vbCrLf
    sTemp = sTemp & "    Words: " & lDeletesWords & vbCrLf
    sTemp = sTemp & "    Characters: " & lDeletesChar & vbCrLf
    MsgBox sTemp
End Sub

This macro steps through each change in the current document and separately sums word counts and character counts for both insertions and deletions. The statistics are then presented in a message box. Note that the macro looks at the Words collection for each change in the document. You should understand that the word count, as presented here, is an approximation. This is because of the way that words are counted. For instance, each punctuation mark in an addition is counted as a separate word. This means that a phrase such as "as one can see, this is a great way" would be tallied as ten words instead of nine (the comma counts as a separate word). Further, if the phrase you added included a leading space—which insertions often do—then there would be eleven words tallied for the insertion because of that space.

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 (1095) 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: Counting Changed 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

Locating Locked Fields

A field can be locked or unlocked, and its condition controls whether it is updated automatically or not. If you want to ...

Discover More

Converting Numbers Into Words

Write out a check and you need to include the digits for the amount of the check and the value of the check written out ...

Discover More

Drawing Lines

Lines are one of the most common graphic elements to be added to documents. Here's how you can add the lines you want.

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)

Displaying Edits by Date

Track Changes is a great tool; it allows you to see what changes were made in a document and then determine whether you ...

Discover More

Examining Tracked Changes in a Macro

The Track Changes feature in Word is very handy when you need to see what edits are made to a document. Using a macro you ...

Discover More

Hiding Formatting Changes in Track Changes

Word can easily (and handily) keep track of changes you make in your document. You may not want all your changes tracked, ...

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 two more than 7?

2023-02-26 00:56:38

Rodrigo

Hi Allen:
I tried installing this macro, but I get a "Run-time error: 5852. Requested object is not available", and the debug directs me to the line " Select Case oRevision.Type" What do you think the problem might be in this case?

Kind regards


2019-07-30 10:12:21

Jessica Houdart

Thank you so much for this macro! I find it really helpful.

One question—have you ever found a way to avoid those leading spaces and punctuation marks being counted as extra words?


2018-11-19 10:41:23

Christina

Counting Changed Words

"... If you have a long document with lots of changes, you may want to know how many words in the document were changed due to insertions and deletions."

I'm sure I've missed something here, because it seems to me that it would be easier to note the number of words before starting Track Changes, then count them again at the end from the final, unmarked-up version. The red mark-up version would show the changed words, which is what the author would be interested to see, but why might one need to know how many there were?

Many thanks for your tips!


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.