Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 10-20-2023, 01:28 AM
w1hang w1hang is offline Is there a way to see the percentage a document was changed from one version to another? Windows 10 Is there a way to see the percentage a document was changed from one version to another? Office 2019
Banned
Is there a way to see the percentage a document was changed from one version to another?
 
Join Date: Oct 2023
Posts: 1
w1hang is on a distinguished road
Default 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  
Old 10-20-2023, 06:30 PM
Guessed's Avatar
Guessed Guessed is offline Is there a way to see the percentage a document was changed from one version to another? Windows 10 Is there a way to see the percentage a document was changed from one version to another? Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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
Closed Thread



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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:03 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft