Link to home
Start Free TrialLog in
Avatar of Michael Murphy
Michael MurphyFlag for Ireland

asked on

How to highlight all superscript numbers in Word 2007

Wore 2007. Is it possible to highlight all superscript numbers in a document? Footnote or Endnote numbers entered manually
Avatar of Rgonzo1971
Rgonzo1971

Hi,

pls try

Sub Macro()
For Each rng In ActiveDocument.StoryRanges
With rng
    .Find.ClearFormatting
    With .Find
        .Font.Superscript = True
        .Font.Subscript = False
        .Text = "[0-9]"
        .Forward = True
        .Wrap = wdFindStop
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
        .Execute
    End With
    Do While .Find.Found = True
        .HighlightColorIndex = wdYellow
        .Find.Execute
    Loop
End With
Next
End Sub

Open in new window

Regards
Avatar of Michael Murphy

ASKER

Can you advise me exactly what I must do?  Step by Step
ASKER CERTIFIED SOLUTION
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial