View Single Post
 
Old 06-07-2023, 04:49 PM
docspecial docspecial is offline Windows 10 Office 2021
Novice
 
Join Date: Jun 2023
Posts: 2
docspecial is on a distinguished road
Default Add braces around strikethrough text

I found a macro to add brackets around underlined text and remove the underline. Now I need to apply braces around strings of strikethrough text.

The code below works for the underlined text, but I still need to address the strikethrough text.

Sub Tag_Under_Line()
Selection.ClearFormatting
Selection.HomeKey wdStory, wdMove
Selection.Find.Font.Underline = wdUnderlineSingle
Selection.Find.Execute ""
Do Until Selection.Find.Found = False
Selection.Font.Underline = wdUnderlineNone
Selection.InsertBefore "["
Selection.InsertAfter "]"
Selection.MoveRight
Selection.Find.Execute ""
Loop
End Sub


Appreciate any help!
Reply With Quote