#1
|
|||
|
|||
Select text between 2
Hi'
What is the command in VBA to upper text, I would like to update the macro below. Thanks https://www.msofficeforums.com/word/...haracters.html Sub Find_and_Italicise() ' ' Macro recorded by Bird_FAT ' 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.Italic = wdToggle Wend End Sub |
#2
|
||||
|
||||
Your question asks for upper case. Your screen shot indicates superscript. The following will do both
Code:
While Selection.Find.Execute Selection.Font.AllCaps = True Selection.Font.Superscript = True Wend
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
thanks Graham, works great.
Superscript was the question. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Select all text in multiple text boxes | Virgule | Word | 0 | 06-07-2017 12:11 PM |
After putting a text box behind text I can't select it anymore | Mike84bs | Word | 2 | 07-25-2016 07:36 AM |
VBA Search Table for Text/Select Text/Insert Hyperlink | sldrellich | Word VBA | 3 | 03-24-2015 01:09 PM |
Microsoft Word macro to find text, select all text between brackets, and delete | helal1990 | Word VBA | 4 | 02-05-2015 03:52 PM |
Select section of text and change text | newbieX | Word VBA | 3 | 03-28-2014 04:21 PM |