Option Explicit
Sub clean_strikeout_text()
Dim word_app As Object, word_doc As Object, rng As Range
Set rng = Selection
Set word_app = CreateObject("Word.Application")
Set word_doc = word_app.Documents.Add
rng.Copy
word_doc.Range.Paste
word_doc.Bookmarks("StartOfDoc").Select
With word_doc.Range.Find
.ClearFormatting
.Font.Strikethrough = True
.Font.DoubleStrikeThrough = False
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = 1 ' <<< wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=2 ' <<< wdReplaceAll
End With
word_doc.Content.Select
word_app.Selection.MoveLeft Extend:=True
word_app.Selection.Copy
rng.Cells(1, 1).Select
ActiveSheet.Paste
word_doc.Close False
word_app.Quit
Set word_app = Nothing
MsgBox "Finito"
End Sub |