Thread: [Solved] superscript to style
View Single Post
 
Old 10-03-2021, 02:26 AM
yacov yacov is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default superscript to style

Hi.
I have a long document with several thousand of superscript text.
All other text is associated with style. (the superscript is in direct formating).
I would like to associate the entire superscript to a new style to make it more convenient to select, resize text or delete. How can this be done?

I did the superscript with the macro:
Sub Find_and_Superscript()
'
' Macro recorded by Bird_FAT and modified later
' This macro uses the wildcard '*' to look for text
' between to underscores, then italicises the text.
' The While/Wend statement at the end causes it to
' loop until it reaches the end of the document.
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = ";*;"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
While Selection.Find.Execute
Selection.Font.Superscript = True
Wend
End Sub
Reply With Quote