![]() |
#1
|
|||
|
|||
![]()
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 |
#2
|
||||
|
||||
![]()
You can create a character style that includes superscript formatting. The find and replace superscript formatting with the style you created.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#3
|
|||
|
|||
![]()
Thanks for your reply but for some resone it does not work for me.
I also tried to select the superscript through the styles manger but probably because I have a lot of superscript it crash. |
#4
|
||||
|
||||
![]()
Could you upload a sample document, as a way to illustrate how the document is set up?
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#5
|
|||
|
|||
![]()
attached file.
In red this superscript is associated with the style. And in black it's everything else |
#6
|
||||
|
||||
![]()
In your sample document, the superscript style has been created as a paragraph style rather than a character style. In this case, when you are finding and replacing character/font formatting, you have to use a character style.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional Last edited by Stefan Blom; 10-05-2021 at 01:09 AM. |
#7
|
|||
|
|||
![]()
thanks a lot
|
#8
|
||||
|
||||
![]()
Does that mean everything is sorted now?
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#9
|
|||
|
|||
![]()
yes. works great thanks
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
RRB | Word | 2 | 06-02-2021 02:54 PM |
![]() |
Swarup | Word | 4 | 07-18-2019 05:51 PM |
![]() |
kingston123 | Word | 7 | 09-23-2018 11:05 PM |
Footnotes/Citations not superscript | wordquery | Word | 3 | 04-12-2017 01:55 PM |
excel update superscript by 1 | htownpaper | Word | 8 | 12-08-2014 06:38 PM |