View Single Post
 
Old 10-20-2023, 06:30 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I don't know of a built in function so I would use VBA to work out how many characters the document has and iterate through the tracked revisions to add up the characters that have changed.

I'm not how to interpret the result though.
For instance if half of the document has deleted text and replaced it with the same volume of text, does this mean 100% change? If we deleted half a document then the maths makes sense but it isn't as easy to arrive at a meaningful result if there are deletions and additions unless you report on those separately.
Code:
Sub WhoMovedMyCheese()
  Dim lngAdd As Long, lngDel As Long, lngOther As Long
  Dim aRev As Revision, lngDoc As Long
  For Each aRev In ActiveDocument.Revisions
    If aRev.Type = wdRevisionDelete Then
      lngDel = lngDel + aRev.Range.Characters.Count
    ElseIf aRev.Type = wdRevisionInsert Then
      lngAdd = lngAdd + aRev.Range.Characters.Count
    Else
      lngOther = aRev.Range.Characters.Count
    End If
  Next aRev
  lngDoc = ActiveDocument.Characters.Count
  MsgBox "The document character count is: " & lngDoc & vbCr & _
          "Additions: " & lngAdd & vbCr & _
          "Deletions: " & lngDel & vbCr & _
          "Other changes: " & lngOther, vbInformation + vbOKOnly, "Changes"
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia