Microsoft Office Forums Macro to format additions deletions when Comparing Files

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-19-2013, 03:03 PM
Alphacsulb Alphacsulb is offline Macro to format additions deletions when Comparing Files Windows 7 64bit Macro to format additions deletions when Comparing Files Office 2010 32bit
Novice
Macro to format additions deletions when Comparing Files
 
Join Date: Aug 2013
Posts: 2
Alphacsulb is on a distinguished road
Question Macro to format additions deletions when Comparing Files

I have Word 2010 - Windows 7 64 Bit.



I'm trying to automate my work flow after I've used the compare function in word.

Essentially I want to do 2 things:

1) For all additions I want to highlight the words with:
Selection.Range.HighlightColorIndex = wdGray25

2) For all deletions I want to strike-through the words:
Selection.Font.StrikeThrough = wdToggle


Thank you for your assistance.

For posterity: This worked:

Sub CompareChanges()
'
'
' Deals with Deleted Changes
Number = ActiveDocument.Revisions.Count
For x = 1 To Number
Set myRev = ActiveDocument.Revisions(x).Range
This = ActiveDocument.Revisions(x).Type
If This = 2 Then
myRev.Font.StrikeThrough = wdToggle
End If
Next x

' Deals with Inserted Changes
For Y = 1 To Number
Set myRev = ActiveDocument.Revisions(Y).Range
That = ActiveDocument.Revisions(Y).Type
If That = 1 Then
myRev.HighlightColorIndex = wdGray25
End If
Next Y

End Sub

Last edited by Alphacsulb; 08-19-2013 at 03:43 PM. Reason: Found the answer in another question.
Reply With Quote
Reply

Tags
addition, deletion, track changes

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to format additions deletions when Comparing Files Comparing with a model format qetuo Word 2 05-01-2013 11:23 PM
Macro to format additions deletions when Comparing Files Formula Additions Incorrect cpwljaw Excel 3 09-21-2012 10:11 AM
Macro to format additions deletions when Comparing Files How-TO format cells (FILL) by comparing cells zanat0s Excel 1 07-03-2012 04:27 AM
Additions to TOC judicial85 Word 0 12-12-2010 08:08 AM
macro for comparing data from 3 columns and pasting into another worksheet ashukla Excel 1 06-24-2009 05:01 PM


All times are GMT -7. The time now is 11:34 PM.


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