Written by Allen Wyatt (last updated August 31, 2019)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and 2021
If you need to develop a macro to process a document in which changes have been tracked (using the Track Changes feature), you may wonder how you can determine the number of changes in the document and how you can look at each of the changes, programmatically. It isn't that tough to do if you remember that the changes are organized when using the Revisions collection. This means that you can determine the number of changes using this code:
iNumChanges = ActiveDocument.Revisions.Count
Just like any other collection, you can step through each member of the Revisions collection and figure out various information about the changes represented in each particular member. While the details of what properties and methods belong to the Revisions collection is much too voluminous for this tip, you can determine the type of each change by looking at the Type property, in this manner:
vChange = ActiveDocument.Revisions(1).Type
At this point, vChange will be equal to a revision type that Word tracks. The actual number or revision types depend on the version of Word you are using, but these are the potential values and the built-in enumeration names for the revision types:
Value | Enumeration | |
---|---|---|
0 | wdNoRevision | |
1 | wdRevisionInsert | |
2 | wdRevisionDelete | |
3 | wdRevisionProperty | |
4 | wdRevisionParagraphNumber | |
5 | wdRevisionDisplayField | |
6 | wdRevisionReconcile | |
7 | wdRevisionConflict | |
8 | wdRevisionStyle | |
9 | wdRevisionReplace | |
10 | wdRevisionParagraphProperty | |
11 | wdRevisionTableProperty | |
12 | wdRevisionSectionProperty | |
13 | wdRevisionStyleDefinition | |
14 | wdRevisionMovedFrom | |
15 | wdRevisionMovedTo | |
16 | wdRevisionCellInsertion | |
17 | wdRevisionCellDeletion | |
18 | wdRevisionCellMerge | |
20 | wdRevisionConflictInsert | |
21 | wdRevisionConflictDelete |
Additional information can be found in Word's Help system or by searching the Internet for the phrase "revisions collection". Information about the enumerations can be found at this Microsoft site:
https://docs.microsoft.com/en-us/office/vba/api/Word.WdRevisionType
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 (8922) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Word here: Examining Tracked Changes in a Macro.
Discover the Power of Microsoft Office This beginner-friendly guide reveals the expert tips and strategies you need to skyrocket your productivity and use Office 365 like a pro. Mastering software like Word, Excel, and PowerPoint is essential to be more efficient and advance your career. Simple lessons guide you through every step, providing the knowledge you need to get started. Check out Microsoft Office 365 For Beginners today!
Track changes is a great feature to use when you want to show what has changed in a document. Word should note which ...
Discover MoreTrack Changes is a great tool for editors and collaborators to use when creating documents. An author, seeking changes ...
Discover MoreThe Track Changes feature in Word can be very helpful when multiple people are working on a document. What if you want to ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
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 © 2025 Sharon Parq Associates, Inc.
Comments