![]() |
|
#1
|
|||
|
|||
|
Hi everyone.
My apologies for the newbie question. I would like to highlight all instances of superscript text in a Word document. I have got as far as the following code but it doesn't seem to be working. Does anyone have any tips on what I am missing here? Many thanks! Code:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Highlight = True
Options.DefaultHighlightColorIndex = wdYellow
Selection.Range.HighlightColorIndex = wdYellow
With Selection.Find
.Font.Superscript = True
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
|
| Tags |
| vba code, word 16 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Footnote reference numbers precede by superscript '(' and follow w/ superscript ')'
|
Swarup | Word | 4 | 07-18-2019 05:51 PM |
Unwanted text highlighting
|
AllusiveKitten | Word | 2 | 07-20-2015 04:00 PM |
Find superscript numbers with a prefix of some default text
|
AlexandarR | Word | 7 | 05-20-2015 07:57 AM |
| Highlighting multiple word instances in text | gekser | Word VBA | 9 | 07-10-2014 05:46 AM |
| Text Highlighting in Yellow ??? | mark4man | Publisher | 0 | 12-15-2005 06:46 PM |