Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Pam Pam is offline
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?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
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   Report Post  
Posted to microsoft.public.word.docmanagement
Pam Pam is offline
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   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
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   Report Post  
Posted to microsoft.public.word.docmanagement
Pam Pam is offline
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   Report Post  
Purell Purell is offline
Banned
 
Posts: 0
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
Reply
Thread Tools
Display Modes

Posting Rules

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 10: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 07: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 07:42 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"