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

Jumping To a Comment

Got a document with lots of comments in it? You can navigate from comment to comment with ease by using the Go To tab of ...

Discover More

Generating a Table of Authorities

With the entries for your table of authorities marked throughout your document, you are ready to actually generate the ...

Discover More

Controlling Case in Find and Replace

When using Find and Replace, how Word handles the case of letters in replacements can be confusing. It needn't be, if you ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (menu)

Rejecting Changes in a Document

When a group of people edits a document with Track Changes turned on, it can be tempting for one of the editors to use ...

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

Pasting Text with Track Changes

Track Changes is a great tool for developing documents. If you want to copy text from one document to another, with ...

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

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.