View Single Post
 
Old 11-29-2012, 11:16 PM
New Daddy New Daddy is offline Windows Vista Office 2003
Advanced Beginner
 
Join Date: Jan 2012
Posts: 90
New Daddy is on a distinguished road
Default

In an attempt to be honest about my daily work progress, I added a couple of lines to the CountRevisions function so that it can subtract the number of words deleted, to give the total the net words added. But it doesn't work. It doesn't seem to be subtracting the number of words deleted.

Any idea why not? Could this be another Word 2003 issue?

Code:
Function CountRevisions(Rng As Range) As Long
Dim oRev As revision, i As Long, j As Long

With Rng
  For i = 1 To .Revisions.Count
    If .Revisions(i).Type = wdRevisionInsert Then
      j = j + .Revisions(i).Range.ComputeStatistics(wdStatisticWords)
    End If
    If .Revisions(i).Type = wdRevisionDelete Then
      j = j - .Revisions(i).Range.ComputeStatistics(wdStatisticWords)
    End If
  Next
End With

CountRevisions = j
End Function