![]() |
|
#1
|
|||
|
|||
|
One of my users is having a rather annoying problem with cross-references and track changes in her documents.
For the purposes of this example assume that track changes is on. Now, let's say we insert a cross-reference to para 3.1. If we change the original paragraph 3.1, so that it is now 3.2, when the cross reference updates it shows that it has deleted 3.1 and inserted 3.2. Great, that's what it's supposed to do. But here is where the problem begins: If we accept the insertion of 3.2 and save the document (or each time the document autosaves) it then readds a track change and shows that it has deleted 3.2 and reinserted 3.2. Every time we subsequently accept that change and save the document it AGAIN shows it being deleted and readded which results in a long string of struck out 3.2. Normally I would just tell my user "Don't accept the insertion each time". But apparently they have to. Is there a way to stop word from updating the cross reference upon save? Or is there another workaround? I've attached the document in case that helps. Thank you, in advance, for your help. |
|
#2
|
||||
|
||||
|
Hi Welshie,
You could lock selected fields via Ctrl+F11 (Ctrl+Shift+F11 unlocks selected fields). Another approach is to accept only the tracked changes that apply to fields. Here's a macro that does just that: Code:
Sub AcceptTrackedFields()
'This sub accepts any tracked changes affecting fields
Application.ScreenUpdating = False
Dim Story As Range, oFld As Field, oRev As Revision, Rng As Range
With ActiveDocument
' Loop through all range objects and accept tracked changes on fields
For Each Story In .StoryRanges
For Each oRev In Story.Revisions
For Each oFld In oRev.Range.Fields
oFld.ShowCodes = True
Set Rng = oFld.Code
With Rng
.MoveEndUntil cset:=Chr(21), Count:=wdForward
.MoveEndUntil cset:=Chr(19), Count:=wdBackward
.End = .End + 1
.Start = .Start - 1
oFld.ShowCodes = False
.Revisions.AcceptAll
End With
Next
Next
Next
End With
Set Rng = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Fabulous, thanks Paul, I'll give this a try and see how it works.
|
|
| Tags |
| cross reference, save, update |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Cross references not updating correctly
|
CLWriter | Word | 4 | 04-03-2012 07:23 AM |
| MS Word cross-references? | entity022 | Word | 3 | 06-03-2010 06:37 AM |
Updating Caption References
|
Mindi Patterson | Word | 1 | 04-07-2010 09:53 PM |
| Formatting Cross References | TrevorS | Word | 0 | 02-27-2010 08:11 AM |
| Cross References | egcharles | Office | 0 | 04-19-2009 06:20 AM |