Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Word 2010. AFAIK, this problem has been in Word since the beginning of time, though.

When I create a field in a document, the field is updated when I force it to (e.g., with F9 or a right-click menu choice) or as a side-effect of opening or printing the file. All that is good - it's why I used a field. Of course, much of the time (sometimes most of the time), the field update results in no change to the resultant text. For example, {numpages} or a cross-reference or the filename is likely to be unchanged.

Unfortunately, if I have revision tracking turned on, every field update is marked with the old result struck out (deleted), and the new value inserted. This happens even if the value didn't change. After a few episodes of opening, closing, printing, updating, etc., you can end up with something that looks like this (I used bold instead of underline in this example due to limitations of the editor) for a cross-reference

see section 2.3.42.3.42.3.42.3.4

IMHO, Word shouldn't consider it a revision if the result text is unchanged. If there's a way to make Word do that in the first place, I'd like to know about it.

As an alternative, if there's some way to easily remove these superfluous (non)revisions from my doc (while preserving all the "real" revisions), that'd be another solution to my problem.

Thanks,
Yosh

share|improve this question
add comment

2 Answers 2

Not a complete solution, but you can avoid the duplicate revisions by turning off tracked revisions just before updating and then turning them back on again after update is complete. You could go further to bind a macro to a keyboard short-cut to do these steps for you automatically.

I'm afraid this wouldn't help much if the fields are being updated automatically before printing however you could choose to turn that off that behavior by going into the options menu, into Display and unticking Update fields before printing.

EDIT: I have written the following macro which should remove such unneeded revisions from fields. It may need some speed improvements if possible.

Sub RemoveUnchangedFieldTrackedChanges()

    Dim oField As Field
    Dim oRevision As Revision

    For Each oField In ActiveDocument.Fields
        For Each oRevision In oField.Parent.Range.Revisions
            Select Case oRevision.Type
            Case wdRevisionInsert
                With oRevision
                    revisionText = .Range.Text

                        For Each iRevision In oField.Parent.Range.Revisions
                            Select Case iRevision.Type
                            Case wdRevisionDelete
                                With iRevision

                                If StrComp(revisionText, iRevision.Range, vbTextCompare) = 0 Then
                                    oRevision.Accept
                                    iRevision.Accept
                                End If

                            End With
                            End Select
                         Next iRevision

                        End With
                End Select
         Next oRevision
    Next oField
End Sub 
share|improve this answer
    
Thanks, Adam. Unfortunately this solution doesn't help me. First, fields are updated on opening and printing - opening certainly gives me no opportunity to turn it off beforehand. And I do want fields to be updated (and marked if changed) - that's why they are fields. I suspect the eventual solution to this problem will be a VBA script to go through & find all cases like I described and remove the spurious revision marks. Unfortunately, my coding skills are too rusty to write it myself. Maybe someone has already done it for me? Or better yet, perhaps there is a more direct solution? –  yosh m Jan 2 '13 at 12:46
    
@Yosh, that's fair enough. There is hope that a macro can help here, I have updated my post. –  Adam Jan 2 '13 at 13:48
    
Wow! Adam, thanks. I'm giving this +1 for your effort before I even check - that's really above & beyond. Thank you. I'll check & if it does the trick I'll come back to mark it accepted. Thanks again. –  yosh m Jan 3 '13 at 8:35
    
Adam. I tried running it. there were two compilation errors due to undeclared variables, so I added for iRevision As Revision and RevisonText As String. Then it compiled - it ran for what seemed a long time (many seconds) until it got "Run-time error '5852': Requested object is not available." at the line oRevision.Accept. Looking at the document, I see that no revisions seem to have been accepted. Any suggestions? Thanks, Yosh. –  yosh m Jan 3 '13 at 8:57
    
@Yosh, Thanks, I tried the macro using a few simple input documents and it worked. Is there any chance you could sanitize and attach a document that the macro is not working with somewhere? –  Adam Jan 3 '13 at 22:59
show 3 more comments

I have recently realized that a solution to the question I posed is to NOT use revision marking at all. Instead, after I've finished all my changes, I use Compare Files to create a Rev-marked version of the document. When doing the comparison, I makes sure to not select the Fields option under Comparison Settings:

enter image description here

Since I usually don't care about Formatting and White space changes I de-select those options, too. The final result (I generally select to create a New document) gives me a document with the salient changes and without the unimportant and distracting (non)changes (like Field values).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.