View Single Post
 
Old 06-07-2023, 05:41 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

Try this code
Code:
Sub Tag_Strikethroughs()
  Dim aRng As Range
  Set aRng = ActiveDocument.Range
  With aRng.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Font.StrikeThrough = True
    .Text = ""
    Do While .Execute = True
      aRng.InsertBefore "{"
      aRng.InsertAfter "}"
      aRng.Characters.Last.Font.StrikeThrough = False
      aRng.Start = aRng.End
      aRng.End = ActiveDocument.Range.End
    Loop
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia

Last edited by Guessed; 06-07-2023 at 07:34 PM. Reason: Pedantic edit: Changed spelling on macro name for no good reason except it bothered me
Reply With Quote