View Single Post
  #2   Report Post  
macropod
 
Posts: n/a
Default Finding most recent addition to document

Hi Karl,

You could use a macro like the following to find the most recent revision.

Sub FindLastRevision()
Dim iRev As Integer
With ActiveDocument
If .Revisions.Count 0 Then
iRev = 1
For i = 1 To .Revisions.Count
If .Revisions(i).Date .Revisions(iRev).Date Then
iRev = i
End If
Next
MsgBox .Revisions(iRev).Range.Text & vbCrLf &
..Revisions(iRev).Date
.Revisions(iRev).Range.Select
End If
End With
End Sub

Note that the code fails if a revision in a table updated just part of the
row, with a "Runtime error '5852' - Requested object is not available"
message. I'm not sure how to code around that, since accessing any of the
affected revision's properties seems to have the same effect. Everything
works fine if the whole row was updated, though.

Cheers

wrote in message
oups.com...
I'm using Track Changes on a very long document in Word 97, where
various lines are being added to points throughout at various times.
Is there a way I can quickly find the most recent addition, or an
addition made on a known date?