View Single Post
 
Old 07-01-2016, 11:26 AM
wardw wardw is offline Windows 7 64bit Office 2007
Advanced Beginner
 
Join Date: Oct 2012
Posts: 59
wardw is on a distinguished road
Default Trying to change Regular to Superscript and vice versa

I'm trying to build a macro that changes regular selected text to superscript and superscript text to regular. I'm using

Code:
If Selection.Font.Superscript = True Then
        With Selection.Font
            .Superscript = False
        End With
    ElseIf Selection.Font.Regular = True Then
        With Selection.Font
            .Superscript = True
        End With
    End If
But compiling this gets "Method or data member not found", with Regular highlighted. There's no objection to Selection.Font.Superscript or .Subscript or many other designations, but I can't find out what the designation is for just regular, normal, unformatted text. Selection.Font.Normal triggers the error as well.

I tried to just record a macro by selecting a superscript and changing it to regular, but this is how "regular" was described . . .

Code:
With Selection.Font
        .Name = "Times New Roman"
        .Size = 10
        .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 = False
        .Subscript = False
        .Spacing = -0.15
        .Scaling = 100
        .Position = 0
        .Kerning = 0
        .Animation = wdAnimationNone
    End With
. . . and I'm not sure how to integrate that into my code. Do I need to specify all those parameters, or is there a simpler way to say "not superscript or subscript"?
Reply With Quote