How do you change insertion/deletions to text formated similarly

N

NateDog

After you have a tracked changes in a document, is there any way to change
the insertions/deletions into text that is formatted similary (i.e., inserted
text changed to text that is formatted to be strikethrough, and deleted text
changed to text that is formatted as bold or underline).

The only thing I can think of is to scan the document into some kind of
character recognition software that can also recognize strikethrough and
underline formatting (if that kind of software exists ??)

NateDog

The below blog was similar to my question but not exactly what I wanted.
That blog dealt with coping insertions/deletions as insertions/deletions in a
new document.
------------------------------------------------------------------------------------

Subject: RE: Word 2003 - Copy and Paste Redline 7/8/2004 1:51 PM PST
By: Kinsa In: microsoft.public.word.docmanagement

Works like a charm! You're awesome! Thank you so much!!!
 
G

Greg

NG,

I can get close, but can't figure out why the I can remove the
strikethrough from the deleted text or change the color of the inserted
text. Here is what I have so far and perhaps someone else can show us
the rest of the way:

Sub Change()
Dim oTrk As Revision
ActiveDocument.TrackRevisions = False
For Each oTrk In ActiveDocument.Range.Revisions
Select Case oTrk.Type
Case wdRevisionDelete
With oTrk.Range.Font
.Bold = True
.StrikeThrough = False
End With
Case wdRevisionInsert
With oTrk.Range.Font
.StrikeThrough = True
.Color = wdRed
End With
Case Else
'Do Nothing
End Select
Next
End Sub
 
N

NateDog

Greg, thanks for your help. Your macro was a good starting point for me. I
have little to no experience doing Microsoft Visual Basic programming or
writing macros, however I was able to write my own set of macros that change
the track changes as follows:
1. deletions are changed to text that is formatted as strikethrough and
highlighted green then they are "rejected" in order to keep them in the
document.
2. insertions are changed to text that is formatted as bold and highlighted
green and then they are "accepted" in order to add them to the document.
3. all other track changes are then accepted as is with no additional
formatting or highlighting.

The macro has a problem when there are track changes in a table, so I have
to make sure that I don't have any track changes in tables before I start my
macro (i.e., I first manually accept or reject the changes and formatted as
above).

Finally, I'm sure someone else could have written a better macro to do the
same thing using far less code and less redundancy. However, I did the best
I could in a limited amount of time.

Since I know very little about Microsoft Visual Basic programming and
macros, I make no garuantee that the macro is free of problems or coding
errors or that it won't cause some else problems with their Word document.
So, anyone who uses this macro, uses it at their own risk.

Here is my macro called RedlineConvertMacro, which actually runs 4 other
macros:

- - - - - - - - - - - - - - - - - - -
Sub RedlineConvertMacro()
Application.Run MacroName:="FormatTrackChanges1"
Application.Run MacroName:="RejectDeletions2"
Application.Run MacroName:="AcceptInsertions3"
Application.Run MacroName:="AcceptAllOtherChanges4"
End Sub
Sub FormatTrackChanges1()
Dim oTrk As Revision
ActiveDocument.TrackRevisions = False
For Each oTrk In ActiveDocument.Range.Revisions
Select Case oTrk.Type
Case wdRevisionInsert
With oTrk.Range.Font
.Bold = True
.StrikeThrough = False
End With
With oTrk.Range.Font.Shading
.BackgroundPatternColor = wdColorBrightGreen
End With
Case wdRevisionDelete
With oTrk.Range.Font
.StrikeThrough = True
End With
With oTrk.Range.Font.Shading
.BackgroundPatternColor = wdColorBrightGreen
End With
Case Else
'Do Nothing
End Select
Next
End Sub
Sub RejectDeletions2()
Dim oTrk As Revision
ActiveDocument.TrackRevisions = False
For Each oTrk In ActiveDocument.Range.Revisions
Select Case oTrk.Type
Case wdRevisionDelete
With oTrk
.reject
End With
Case Else
'Do Nothing
End Select
Next
End Sub
Sub AcceptInsertions3()
Dim oTrk As Revision
ActiveDocument.TrackRevisions = False
For Each oTrk In ActiveDocument.Range.Revisions
Select Case oTrk.Type
Case wdRevisionInsert
With oTrk
.accept
End With
Case Else
'Do Nothing
End Select
Next
End Sub
Sub AcceptAllOtherChanges4()
WordBasic.AcceptAllChangesInDoc
End Sub
- - - - - - - - - - - - - - - - - - -

NateDog
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top