Getting a Change and Comment Count by Author

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


1

Jackie uses Track Changes regularly in her department. She notes that it would be nice to be able to analyze a marked-up document to get a count of how many changes and how many comments were made by the various editors on the document.

Word does not provide that ability. You can, however, create a macro that may give you the information you desire. The following example steps through each revision in a document and accumulates the editor names and a count of each editor's changes.

Sub CountReviewers()
    Dim J As Integer
    Dim Cnt As Integer
    Dim sMsg As String
    Dim Authors(299) As String
    Dim aCount(299) As Long
    Dim aRev As Revision
    Dim bNew As Boolean

    Cnt = 0
    On Error GoTo RevNext

    For Each aRev In ActiveDocument.Revisions
        ' Check to see if this is a new author
        bNew = True
        For J = 1 To Cnt
            If aRev.Author = Authors(J) Then
                ' Already have author
                aCount(J) = aCount(J) + 1
                bNew = False
            End If
        Next J
        If bNew Then
            ' New author; add to list
            Cnt = Cnt + 1
            Authors(Cnt) = aRev.Author
            aCount(Cnt) = 1
        End If
RevNext:
    Next aRev

    ' Put together and display final report
    sMsg = ""
    For J = 1 To Cnt
        sMsg = sMsg & Authors(J) & " (" & Trim(Str(aCount(J))) & ")" & vbCrLf
    Next J
    sMsg = sMsg & "Total revisions:" & Str(ActiveDocument.Range.Revisions.Count)
    MsgBox sMsg
End Sub

There are a few things to remember when using a macro like this. First, it is hard-coded to handle up to 299 editors on the document. If you have more, just increase the number of elements by which the Authors() and aCount() arrays are dimensioned. Second, if your document is long and has a lot of edits, it can take a while for the macro to run. So, the longer and more heavily edited the document, the more patient you'll need to be.

Finally, it is possible that the macro may ingloriously crash with some documents. (Not all, but just some.) This seems to happen most often with documents that have a tracked change caused by an automatic field change. The error that is thrown by such a scenario cannot be trapped for some reason, as this problem seems to be rooted in either a VBA or Excel error.

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 (13873) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 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

Numbers to Text, Take Three (Over a Million)

So, you need to convert a number to text that is over one million? Here is a VBA macro that will convert up to 999,999,999.

Discover More

Controlling Display of the Scroll Bars

The scroll bars can be very handy in navigating your worksheet, but did you know you can turn them off or on at will? ...

Discover More

Searching for a Value Using a Function

Searching for a value using Excel's Find tool is easy; searching for that same value using a formula or a macro is more ...

Discover More

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!

More WordTips (ribbon)

Producing Cleaner Markup

Sometimes it seems that Word is overly aggressive in what it shows in its markup when you have Track Changes turned on. ...

Discover More

Making Word Stop at the End of a Document when Reviewing Changes

The Track Changes tool is a great help when you want to see what edits have been made to a document. When you review ...

Discover More

Getting Rid of Markup

Word includes editing tools that allow you to track what changes you've made in a document. Making the tracked changes go ...

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 seven minus 7?

2021-07-26 11:57:55

Richard Curtis

In Word 365, the revieweing pane displays the number of revisions in the document. Show Markup > Specific People can be limited to one author to show the number of relevant changes. This would rapidly become tedious for 299 authors though (see article).


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.