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

by Allen Wyatt
(last updated March 24, 2012)

2

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.

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

Aligning Borders with the Page Margins

Add a border to a paragraph and you may find that it extends to the left and right of the regular text margins. To pull the ...

Discover More

Going to the Corners of a Selected Range

When you select a range of cells (particularly if it is a large range of cells), you may not be quite sure if you've selected ...

Discover More

Merging Many Workbooks

If you need to combine the contents of a bunch of workbooks into a single workbook, the process can get tedious. Here's a ...

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)

Multiple Document Users

If you have a group of people working on a single document, you may wonder what tools are available in Word to facilitate the ...

Discover More

Tracked Changes Notification when Opening

If you have Word configured to show markup on-screen and you look through a document, it is easy to tell where changes have ...

Discover More

Printing without Track Changes Marks

If your document has a lot of markup visible in it, you may want to print a copy of the document that doesn't reflect those ...

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 for this tip:

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}] in your comment text. You’ll be prompted to upload your image when you submit the comment. 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 9 + 8?

2013-10-04 06:31:41

dingle

Thanks for this macro, I had been tearing my hair out trying to get these counts. Very helpful


2013-06-20 08:37:36

Pradeep Sharma

I need a macro for track changes by which i can extract the complete old sentence in the left column of new word document and complete new sentence in the right column of same new word document.


Newest Tips
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.

Links and Sharing
Share