SubScript Property

Microsoft Publisher Visual Basic

constant indicating whether characters are formatted as subscript in the specified text range. Read/write.

MsoTriState can be one of these MsoTriState constants.
msoCTrue Not used with this property.
msoFalse No characters in the range are formatted as subscript.
msoTriStateMixed Return value indicating a combination of msoTrue and msoFalse.
msoTriStateToggle Set value which toggles between msoTrue and msoFalse.
msoTrue All characters in the range are formatted as subscript.

expression.SubScript

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

Setting the SubScript property to msoTrue will remove superscript formatting from the text range.

Example

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

Sub SubScript()

    Dim fntSS As Font

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

End Sub