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.
Written by Allen Wyatt (last updated November 17, 2018)
This tip applies to Word 97, 2000, 2002, and 2003
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:
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.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
The Track changes feature in Word is a great help in editing documents, particularly if you are working with others or ...
Discover MoreWhen changes are made in a document with Track Changes turned on, each author's changes are normally shown in a different ...
Discover MoreTurn Track Changes on, and you can easily see where you've made changes throughout a document. If you want to print only ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
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!
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments