Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
Update of cross references with track changes on | Microsoft Word Help | |||
Cross-references | Microsoft Word Help | |||
Why is track changes crossing out cross-references when TC toggle | Microsoft Word Help | |||
Cross references | Formatting Long Documents | |||
cross references | Formatting Long Documents |