Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-01-2016, 11:26 AM
wardw wardw is offline Trying to change Regular to Superscript and vice versa Windows 7 64bit Trying to change Regular to Superscript and vice versa Office 2007
Advanced Beginner
Trying to change Regular to Superscript and vice versa
 
Join Date: Oct 2012
Posts: 65
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
 

Tags
convert regular font, convert superscript font



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to change Regular to Superscript and vice versa Sub/superscript hotkey danish keyboard Fakecake OneNote 1 04-05-2015 04:39 AM
excel update superscript by 1 htownpaper Word 8 12-08-2014 06:38 PM
Insert superscript into a textbox Deltaj Word VBA 3 11-30-2014 04:23 PM
Trying to change Regular to Superscript and vice versa Regular (roman) character style doesn't change text to roman kcbenson Word 2 10-16-2014 01:31 PM
Trying to change Regular to Superscript and vice versa Sizing cells to pics (or even vice versa?) Guloluseus Excel 1 07-27-2014 11:24 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:50 PM.


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