Superscript Property

Microsoft Word Visual Basic

Superscript Property

       

True if the font is formatted as superscript. Returns True, False, or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Long.

expression.Superscript

expression   Required. An expression that returns a Font object.

Remarks

Setting the Superscript property to True sets the Subscript property to False, and vice versa.

Example

This example inserts text at the beginning of the active document and formats two characters in the fourth word as superscript.

Set myRange = ActiveDocument.Range(Start:=0, End:=0)
myRange.InsertAfter "Superscript in the 4th word."
ActiveDocument.Range(Start:=20, End:=22).Font.Superscript = True

This example formats the selected text as superscript.

If Selection.Type = wdSelectionNormal Then
    Selection.Font.Superscript = True
Else
    MsgBox "You need to select some text."
End If