logo
search
VBA & Macro Problems

How to Make Word VBA Formatting Changes Appear as Tracked Changes

Kushani NimanthikaKushani Nimanthika Oct 15, 2026 868 views

Question details

The user needs formatting changes applied via VBA or Find and Replace to be visibly recorded as tracked changes in the document.

How to Track Formatting Changes Applied by Word VBA
Product
Microsoft Word
Device & OS
not provided
Scenario
Running a VBA macro to apply formatting (like highlights) while Track Changes is enabled in a document.
Observed behavior
Word does not consistently record VBA-applied formatting as a tracked formatting revision, whereas manual formatting creates visible revisions.
Before you start

Always test revision-handling VBA macros on a copy of your document first, as improper loops can accidentally reject or accept existing tracked changes that you meant to preserve.

Solution 1Recommended

Use Wildcards in VBA Find and Replace to Force Revisions

By using a wildcard search to replace text with itself plus formatting, you can force Word to generate an insertion/deletion revision, then selectively process those revisions.

This method involves turning on Track Changes, using wildcards to replace existing text with the exact same text while adding a highlight, and then using a loop to reject the insertions so that only the highlighted deletions remain visible as revisions.

1
Enable Track Changes in your macro

Add 'ActiveDocument.TrackRevisions = True' to the beginning of your macro to ensure Word is actively tracking new modifications.

2
Configure wildcard Find and Replace

Set up your 'Selection.Find' block. Enable wildcards ('.MatchWildcards = True') and set your search text, such as '(<[0-9]>)'. Set the replacement text to '\1' to insert the exact found string back into the document.

3
Apply formatting to the replacement

Specify the formatting you want to track, for example, 'Selection.Find.Replacement.Highlight = True' or setting a specific font color index.

4
Execute the replace operation

Run the find and replace by adding 'Selection.Find.Execute Replace:=wdReplaceAll' to your code.

5
Process the generated revisions

Create a loop through 'ActiveDocument.Range.Revisions'. Check if the revision type is 'wdRevisionInsert', and if so, apply the '.Reject' method. This leaves the highlighted changes visible.

Use Wildcards in VBA Find and Replace to Force Revisions
Warning for existing tracked changes: If your document already contains unresolved insertion revisions, the simple loop above will reject those as well. You may need to restrict the loop to a specific range or track the exact revisions created by the macro.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Review and Editing

If you are frustrated by Microsoft Word's complex macro behaviors or inconsistent revision tracking, consider switching to WPS Office. It provides a highly compatible, intuitive environment for all your document review and editing needs without the heavy footprint.

Fully compatible with Microsoft Word formats (.doc, .docx)Built-in, reliable Track Changes and document review toolsFree and lightweight alternative to heavy office suitesFamiliar user interface for a seamless, zero-learning-curve migration
microsoft office alternative - wps office

Frequently Asked Questions

Why does Word VBA ignore highlighting when Track Changes is enabled?

Word's Track Changes engine sometimes treats certain VBA-applied properties, like highlighting, as display attributes rather than structural formatting revisions. It often requires text to actually be replaced or modified to trigger a visible revision record.

Will rejecting insertions in the macro affect my other tracked changes?

Yes. If your VBA code loops through all document revisions and rejects every insertion (wdRevisionInsert), it will also reject insertions made manually before running the macro. You must isolate the macro's operations to a specific selection or document range to prevent data loss.

Does VBA Track Changes behavior differ between Windows and Mac?

Yes. The VBA object model and the underlying Track Changes engine can behave differently across platforms. Word for Mac might sometimes record formatting revisions that Word for Windows ignores, or vice versa, requiring cross-platform testing for complex macros.