|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Is there a way to see the percentage a document was changed from one version to another?
I'm trying to record some data for my job. One thing I want to do is see the percentage of differences between one version of a document and another. I know you can use legal blackline to do a compare docs and get the number of changes, but is there any way to convert that to a percentage of how much of the overall document was changed? If it's not an official offering within the system, does anyone know of another way to gather this data? |
#2
|
||||
|
||||
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 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I recover a word document that was 'Saved-over' with another (old) version of same document? | Mrsolace | Word | 2 | 09-10-2021 10:50 AM |
Document icon has changed | persius | Office | 0 | 12-29-2019 05:17 PM |
Word 2016 changed formatting of my document | MLuis | Word | 4 | 10-08-2017 02:30 PM |
I have a document which needs one field changed throughout | simonrumney | Word | 5 | 06-05-2017 07:12 PM |
Detect in VBA if document has been changed | nsv | Word VBA | 4 | 04-28-2014 05:58 AM |