Question Locked

Superscript Macro

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to write a macro for Word 2003 that will change all of the numbers ("^#") in a document to superscript. Please help. Thank you!

2 replies

by larryd4

Coleman,
The easiest way to do what you want is to recored a macro and perform the actions. I simply typed in your text, click record macro and then changed the text to superscript. I then went in and edited the macro to reveal the code for what you did. Notice the superscript variable field. That's what you need to change in your macro.

With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = True
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With

This discussion is closed to new replies.