Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2021, 02:26 AM
yacov yacov is offline superscript to style Windows 10 superscript to style Office 2016
Competent Performer
superscript to style
 
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
  #2  
Old 10-04-2021, 04:22 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline superscript to style Windows 10 superscript to style Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

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
Reply With Quote
  #3  
Old 10-04-2021, 05:40 AM
yacov yacov is offline superscript to style Windows 10 superscript to style Office 2016
Competent Performer
superscript to style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 10-04-2021, 05:41 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline superscript to style Windows 10 superscript to style Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

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
Reply With Quote
  #5  
Old 10-04-2021, 06:07 AM
yacov yacov is offline superscript to style Windows 10 superscript to style Office 2016
Competent Performer
superscript to style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

attached file.
In red this superscript is associated with the style. And in black it's everything else
Attached Files
File Type: docm EXAMPLE.docm (14.5 KB, 5 views)
Reply With Quote
  #6  
Old 10-04-2021, 08:09 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline superscript to style Windows 10 superscript to style Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

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.
Reply With Quote
  #7  
Old 10-04-2021, 08:28 AM
yacov yacov is offline superscript to style Windows 10 superscript to style Office 2016
Competent Performer
superscript to style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

thanks a lot
Reply With Quote
  #8  
Old 10-04-2021, 09:59 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline superscript to style Windows 10 superscript to style Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Does that mean everything is sorted now?
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #9  
Old 10-04-2021, 10:08 PM
yacov yacov is offline superscript to style Windows 10 superscript to style Office 2016
Competent Performer
superscript to style
 
Join Date: Oct 2019
Posts: 139
yacov is on a distinguished road
Default

yes. works great thanks
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
superscript to style Char style and footnotes reference style superscript - applying character style removes superscript RRB Word 2 06-02-2021 02:54 PM
superscript to style Footnote reference numbers precede by superscript '(' and follow w/ superscript ')' Swarup Word 4 07-18-2019 05:51 PM
superscript to style How to use subscript and superscript in fractions? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 10:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft