A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Track Changes for Cross-References



 
 
Thread Tools Display Modes
  #1  
Old October 27th 09, 11:01 PM posted to microsoft.public.word.docmanagement
Pam
external usenet poster
 
Posts: 91
Default Track Changes for Cross-References

I have cross-references to tables in my document and I have track changes
(change bars) turned on. When I update all the fields, I get change bars for
the table cross-references even though they haven't changed. Is there a way
to get Word to recognize that the field hasn't changed?
Ads
  #2  
Old October 28th 09, 06:32 AM posted to microsoft.public.word.docmanagement
macropod[_2_]
external usenet poster
 
Posts: 2,060
Default Track Changes for Cross-References

Hi Pam,

Depending on the type of cross-reference and the effect your edits have had on the referenced range (even just a change in auto para
numbering or page number), updating fields while change-tracking is on will cause the old reference to be deleted and replaced by a
new one. Turning off change tracking before doing anything that updates the cross-references will help overcome that.

As a fall-back, you can run the following macro to 'accept' all updated fields:
Sub AcceptTrackedFields()
' Macro to accept tracked changes on fields
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
Do
For Each Fld In oRng.Fields
Fld.Select
Selection.Range.Revisions.AcceptAll
Next
Set oRng = oRng.NextStoryRange
Loop Until oRng Is Nothing
Next
End With
' Restore the original document view
With ActiveWindow
If .View.SplitSpecial = wdPaneNone Then
.ActivePane.View.Type = wdPrintView
Else
.View.Type = wdPrintView
End If
.View.SeekView = wdSeekMainDocument
.View.Type = oView
SelRng.Select
End With
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub

--
Cheers
macropod
[Microsoft MVP - Word]


"Pam" wrote in message ...
I have cross-references to tables in my document and I have track changes
(change bars) turned on. When I update all the fields, I get change bars for
the table cross-references even though they haven't changed. Is there a way
to get Word to recognize that the field hasn't changed?


  #3  
Old October 28th 09, 05:11 PM posted to microsoft.public.word.docmanagement
Pam
external usenet poster
 
Posts: 91
Default Track Changes for Cross-References

Thank you so much for the macro. I have not tested it yet. I just wanted to
clarify. All changes in the document have been accepted. When you go to
print, and it updates the fields, some of them are still showing change bars.
This happens in some documents and not in others. Is the only way to avoid
this to turn off "track changes"?

"macropod" wrote:

Hi Pam,

Depending on the type of cross-reference and the effect your edits have had on the referenced range (even just a change in auto para
numbering or page number), updating fields while change-tracking is on will cause the old reference to be deleted and replaced by a
new one. Turning off change tracking before doing anything that updates the cross-references will help overcome that.

As a fall-back, you can run the following macro to 'accept' all updated fields:
Sub AcceptTrackedFields()
' Macro to accept tracked changes on fields
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
Do
For Each Fld In oRng.Fields
Fld.Select
Selection.Range.Revisions.AcceptAll
Next
Set oRng = oRng.NextStoryRange
Loop Until oRng Is Nothing
Next
End With
' Restore the original document view
With ActiveWindow
If .View.SplitSpecial = wdPaneNone Then
.ActivePane.View.Type = wdPrintView
Else
.View.Type = wdPrintView
End If
.View.SeekView = wdSeekMainDocument
.View.Type = oView
SelRng.Select
End With
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub

--
Cheers
macropod
[Microsoft MVP - Word]


"Pam" wrote in message ...
I have cross-references to tables in my document and I have track changes
(change bars) turned on. When I update all the fields, I get change bars for
the table cross-references even though they haven't changed. Is there a way
to get Word to recognize that the field hasn't changed?


.

  #4  
Old October 28th 09, 09:41 PM posted to microsoft.public.word.docmanagement
macropod[_2_]
external usenet poster
 
Posts: 2,060
Default Track Changes for Cross-References

Hi Pam,

Yes, you really should have 'track changes' switched off before printing a document with fields.

--
Cheers
macropod
[Microsoft MVP - Word]


"Pam" wrote in message ...
Thank you so much for the macro. I have not tested it yet. I just wanted to
clarify. All changes in the document have been accepted. When you go to
print, and it updates the fields, some of them are still showing change bars.
This happens in some documents and not in others. Is the only way to avoid
this to turn off "track changes"?

"macropod" wrote:

Hi Pam,

Depending on the type of cross-reference and the effect your edits have had on the referenced range (even just a change in auto
para
numbering or page number), updating fields while change-tracking is on will cause the old reference to be deleted and replaced by
a
new one. Turning off change tracking before doing anything that updates the cross-references will help overcome that.

As a fall-back, you can run the following macro to 'accept' all updated fields:
Sub AcceptTrackedFields()
' Macro to accept tracked changes on fields
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
Do
For Each Fld In oRng.Fields
Fld.Select
Selection.Range.Revisions.AcceptAll
Next
Set oRng = oRng.NextStoryRange
Loop Until oRng Is Nothing
Next
End With
' Restore the original document view
With ActiveWindow
If .View.SplitSpecial = wdPaneNone Then
.ActivePane.View.Type = wdPrintView
Else
.View.Type = wdPrintView
End If
.View.SeekView = wdSeekMainDocument
.View.Type = oView
SelRng.Select
End With
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub

--
Cheers
macropod
[Microsoft MVP - Word]


"Pam" wrote in message ...
I have cross-references to tables in my document and I have track changes
(change bars) turned on. When I update all the fields, I get change bars for
the table cross-references even though they haven't changed. Is there a way
to get Word to recognize that the field hasn't changed?


.


  #5  
Old November 3rd 09, 09:41 PM posted to microsoft.public.word.docmanagement
Pam
external usenet poster
 
Posts: 91
Default Track Changes for Cross-References

OK. Thank you.

Here's an odd fix to my original problem of the cross-references to tables
showing change bars even though the fields haven't changed. I think the
problem came about from the document having been a Word 2003 document and
then being saved as a Word 2007 document. I just changed the font size and
then changed it back. The cross-references no longer shows change bars when
updating all the fields. I don't know why, but it works.

"macropod" wrote:

Hi Pam,

Yes, you really should have 'track changes' switched off before printing a document with fields.

--
Cheers
macropod
[Microsoft MVP - Word]


"Pam" wrote in message ...
Thank you so much for the macro. I have not tested it yet. I just wanted to
clarify. All changes in the document have been accepted. When you go to
print, and it updates the fields, some of them are still showing change bars.
This happens in some documents and not in others. Is the only way to avoid
this to turn off "track changes"?

"macropod" wrote:

Hi Pam,

Depending on the type of cross-reference and the effect your edits have had on the referenced range (even just a change in auto
para
numbering or page number), updating fields while change-tracking is on will cause the old reference to be deleted and replaced by
a
new one. Turning off change tracking before doing anything that updates the cross-references will help overcome that.

As a fall-back, you can run the following macro to 'accept' all updated fields:
Sub AcceptTrackedFields()
' Macro to accept tracked changes on fields
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
Do
For Each Fld In oRng.Fields
Fld.Select
Selection.Range.Revisions.AcceptAll
Next
Set oRng = oRng.NextStoryRange
Loop Until oRng Is Nothing
Next
End With
' Restore the original document view
With ActiveWindow
If .View.SplitSpecial = wdPaneNone Then
.ActivePane.View.Type = wdPrintView
Else
.View.Type = wdPrintView
End If
.View.SeekView = wdSeekMainDocument
.View.Type = oView
SelRng.Select
End With
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub

--
Cheers
macropod
[Microsoft MVP - Word]


"Pam" wrote in message ...
I have cross-references to tables in my document and I have track changes
(change bars) turned on. When I update all the fields, I get change bars for
the table cross-references even though they haven't changed. Is there a way
to get Word to recognize that the field hasn't changed?

.


.

  #6  
Old July 17th 19, 10:01 PM
Purell Purell is offline
Banned
 
First recorded activity by WordBanter: Jul 2019
Posts: 1
Default

Hello,

This is something I need help from you guys. I have a pretty large document and when these documents gets revised instead of searching where the changes happened and print them. Is there a way to print only the pages where changes happened.

I have found a Macro to do this, print only the pages where changes happened but when I hit print the document gets refreshed and all the cross referenced such as Table numbers, figure numbers get updated and when I used the macro it prints those pages as well.

Below is the Marco I have got from some user in this forum:

Sub PrintTrackedChanges()

Dim revpagestart As Long, revpageend As Long, pageprint As String,
changedpages As String

pageprint = 0
changedpages = ""

Application.ScreenUpdating = False

currentselectionstart = Application.Selection.Start
currentselectionend = Application.Selection.End


With ActiveDocument
If .Revisions.Count = 0 Then MsgBox ("There are no revisions in this
document"): GoTo Finish
If .Revisions.Count 20 Then If MsgBox("There are" +
Str(.Revisions.Count) + " revisions in this document. Checking and
printing them may take some time. Continue?", vbYesNo) = vbNo Then
GoTo Finish

For i = 1 To .Revisions.Count
.Revisions(i).Range.Select
revpageend = Selection.Information(wdActiveEndPageNumber)
Selection.Collapse wdCollapseStart
revpagestart = Selection.Information(wdActiveEndPageNumber)

If .Revisions(i).Type = wdRevisionProperty Then GoTo Skip
If .Revisions(i).Type = wdRevisionParagraphProperty Then GoTo
Skip
If .Revisions(i).Type = wdRevisionSectionProperty Then GoTo
Skip

If pageprint = revpageend Then GoTo Skip

If revpagestart = revpageend Then
changedpages = changedpages + Str(revpageend) + ", "
pageprint = revpageend
End If

If revpageend revpagestart Then
changedpages = changedpages + Str(revpagestart) + "-" +
Str(revpageend) + ", "
pageprint = revpageend
End If
Skip:
Next i
End With

If changedpages = "" Then
MsgBox "There are no changed pages to print"
GoTo Finish
End If

changedpages = Left(changedpages, Len(changedpages) - 2)

With Dialogs(wdDialogFilePrint)
.Range = wdPrintRangeOfPages
.Pages = changedpages
.Show
End With

Finish:

Selection.SetRange Start:=currentselectionstart,
End:=currentselectionend
Application.ScreenUpdating = True

End Sub
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update of cross references with track changes on Alessandro Triglia Microsoft Word Help 1 June 18th 08 09:53 AM
Cross-references Aleksander Microsoft Word Help 6 February 14th 08 09:36 AM
Why is track changes crossing out cross-references when TC toggle Holly Microsoft Word Help 6 May 14th 07 10:37 PM
Cross references Ricki Miles Formatting Long Documents 2 March 12th 07 06:23 PM
cross references Frank Drost Formatting Long Documents 2 March 30th 05 01:30 PM


All times are GMT +1. The time now is 04:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.