View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] dpkreil@gmail.com is offline
external usenet poster
 
Posts: 1
Default Find most recent addition

Not entirely what you're asking for but I find that the below gives me the additional info I require. Also note the two additional revision types.
Best displayed in a 'landscape' document...


Sub RevisionsByDateTime()
' source: https://groups.google.com/forum/?hl=...M/A_oF4CbMiCEJ
Dim srcDoc As Document, destDoc As Document
Dim oRev As Revision
Dim oTbl As Table
Dim nRows As Long

Set srcDoc = ActiveDocument
Set destDoc = Documents.Add
destDoc.Sections(1).Headers(wdHeaderFooterPrimary) _
.Range.Text = "Revisions in " & _
srcDoc.FullName

RevType = Array("NoRevision", "Insert", "Delete", _
"Property", "ParagraphNumber", "DisplayField", _
"Reconcile", "Conflict", "Style", "Replace", _
"ParagraphProperty", "TableProperty", _
"SectionProperty", "StyleDefinition", "MovedFrom", "MovedTo")

Set oTbl = destDoc.Tables.Add(Range:=destDoc.Range, _
numrows:=1, numcolumns:=5)
nRows = 1
With oTbl
.Cell(1, 1).Range.Text = "Date & Time"
.Cell(1, 2).Range.Text = "Pg Ln"
.Cell(1, 3).Range.Text = "Author"
.Cell(1, 4).Range.Text = "Type"
.Cell(1, 5).Range.Text = "Text"

For Each oRev In srcDoc.Revisions
.Rows.Add
nRows = nRows + 1
.Cell(nRows, 1).Range.Text = _
oRev.Date
.Cell(nRows, 2).Range.Text = oRev.Range.Information( _
wdActiveEndAdjustedPageNumber) & " " & _
oRev.Range.Information(wdFirstCharacterLineNumber)
.Cell(nRows, 3).Range.Text = oRev.Author
.Cell(nRows, 4).Range.Text = RevType(oRev.Type)
.Cell(nRows, 5).Range.Text = oRev.Range.Text
Next oRev

.Rows(1).HeadingFormat = True
.Sort excludeheader:=True, fieldnumber:=1, _
sortfieldtype:=wdSortFieldDate
End With
End Sub