Table of contents
TOC
Collapse the table of content
Expand the table of content

Font.SuperScript Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns or sets an MsoTriState constant indicating whether characters are formatted as superscript in the specified text range. Read/write.

Syntax

expression. SuperScript

_expression_A variable that represents a Font object.

Return Value

MsoTriState

Remarks

The SuperScript property value can be one of the MsoTriState constants declared in the Microsoft Office type library and shown in the following table.

ConstantDescription
msoFalseNo characters in the range are formatted as superscript.
msoTriStateMixedReturn value indicating a combination of msoTrue and msoFalse for the specified shape range.
msoTriStateToggleSet value that switches between msoTrue and msoFalse.
msoTrueAll characters in the range are formatted as superscript.

Setting the SuperScript property to msoTrue removes subscript formatting from the text range.

Example

This example tests the text in the second story and, if it has mixed superscripting, it formats all the text as superscript.

Sub SuperScript() 

 Dim fntSuper As Font 

 Set fntSuper = Application.ActiveDocument.Stories(2).TextRange.Font 
 With fntSuper 
 If .SuperScript = msoTriStateMixed Then 
 .SuperScript = msoTrue 
 Else 
 MsgBox "Mixed superscript not in this story." 
 End If 
 End With 

End Sub
© 2018 Microsoft