View Single Post
 
Old 09-30-2023, 08:00 AM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 293
vivka is on a distinguished road
Default

Hi, RobiNew! Just replace selection with ActiveDocument.range:
Code:
Sub Macro()

Dim oRng As range
Set oRng = ActiveDocument.range
    oRng.Find.ClearFormatting
    With oRng.Find.Font
        .Superscript = True
    End With
    oRng.Find.Replacement.ClearFormatting
    With oRng.Find.Replacement.Font
        .Superscript = False
    End With
    oRng.Find.Execute Replace:=wdReplaceAll
End Sub
Note that this is the fastest replacement.
Reply With Quote