Word: Macro to fix Track Changes/Cross References issues and accept all field changes

October 16, 2009

The problem

When all Track Changes have not been accepted, you may not be able to insert a cross-reference to a table or figure caption correctly. Either you see multiple instances of the caption listed in the Cross Reference dialog box, OR you don’t see the caption at all, OR you see an incorrect table/figure number for the caption (e.g. you see Table 5.1 instead of Table 1.1).

This is a known issue with Word since at least Word 2000 (see the list of resources at the end of this post).

The issue

You’d think that accepting all changes would be sufficient. And it is. But accepting all changes is not appropriate where you have a document that MUST keep Track Changes on, such as one that has to go through a regulatory compliance process through all its revisions. I have been working on these types of documents. In Word 2003, it was never really an issue — double-upped cross-references were an annoyance more than anything, and we never noticed any that were missing. But as soon as my client started using Word 2007, we came across serious issues with existing table and figure captions not being listed in the Cross Reference dialog.

A little testing showed that it was related to Track Changes being on and the acceptance of all changes in the document. Armed with that knowledge, I headed off to trusty Google to try to find a solution — a solution that allowed cross-reference and caption fields (and lists of tables and figures) to be updated without affecting other parts of the document.


Macropod (clever name!), a Microsoft Word MVP, had posted a macro that solved the problem (http://www.pcreview.co.uk/forums/thread-31716892.php). It worked great, but it dropped me into the footer and into Draft view at the end of the document when it was finished. So I posted my request to the Microsoft Word Programming Discussion Group, and the ever-helpful Macropod tweaked his/her original macro to get me what I wanted, which was to return to where I was when I ran the the macro.

Here’s Macropod’s revised macro:

Sub AcceptTrackedFields()
Dim oRng As Range ' All Range objects - includes ranges in the body, Headers , Footers & Shapes
Dim Fld As Field ' Field Object
Dim oView As Variant ' The original document view
Dim SelRng As Range ' The original selection
' Turn Off Screen Updating
Application.ScreenUpdating = False
With ActiveDocument
oView = ActiveWindow.View.Type
Set SelRng = Selection.Range
' Loop through all range objects and accept tracked changes on fields
For Each oRng In .StoryRanges
For Each Fld In oRng.Fields
Set oRng = oRng.NextStoryRange
Loop Until oRng Is Nothing
End With
With ActiveWindow
If .View.SplitSpecial = wdPaneNone Then
.ActivePane.View.Type = wdPrintView
.View.Type = wdPrintView
End If
.View.SeekView = wdSeekMainDocument
.View.Type = oView
End With
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub

Thanks heaps, Macropod! The generosity of the Microsoft MVPs and community is humbling.

See also:

Some websites that discuss this issue

See also:

[Links last checked October 2009]


  1. […] out yet, so I’m not exactly sure what it does or how it works, but if it saves me having to run a macro to accept all tracked field changes, that would be […]

  2. […] was happening with the field updating that can get messed up when track changes are on (see https://cybertext.wordpress.com/2009/10/16/word-macro-to-fix-track-changescross-references-issues/ for how to fix […]

  3. […] to report in the new document. I still had to accept the formatting changes for the tables and the cross-reference field changes, but that was […]

  4. Hi Rhonda,

    I’m having this problem for the first time, and an online thread led me to your macro. I have run the macro, but I am still not seeing figure or table captions in the CR dialog.

    I am unable to accept changes at this stage in the document development, so I’m at a loss as to what I should do. If you have any other suggestions for resources, please let me know.


  5. Hi Eddie

    Have the captions been added using the ‘Insert Caption’ feature in Word? If they have, they should show. If they’ve been added manually, then you’ll need to make them auto captions. Also, check that the Caption style is used for them.

    That’s about all I can suggest without seeing the document.


  6. […] There may be some that can be dealt with that aren’t required for regulator approval, such as track changes to fields, formatting changes, minor punctuation or case changes that don’t change the meaning of the […]

  7. Genius! Works perfectly! Thanks!

  8. Ran the macro and it worked perfecly for me. Thanks!!

  9. Hope you can help. I have a 700+ page document with table and figure captions that were inserted using the Insert Caption function. My document has headings 1-9 and the captions include each heading and automatic number…THis morning, all of my designated Tables changed to Figure labels and now the heading numbering is off. When I insert a caption for a level two heading it changes all other table captions to a level 2 caption number. when I fix the incorrect caption to be a level 4 heading caption then it changes all the other table captions to a level 4 heading. I’ve been working on this document for weeks….hoping I don’t have to start over. Thanks!

  10. […] Related to this is a blog post I wrote several years ago on missing cross-references for table and figure captions where track changes had been turned on that resulted in the caption numbering changing as tables/figures were added/deleted from the document: https://cybertext.wordpress.com/2009/10/16/word-macro-to-fix-track-changescross-references-issues/ […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: