如果该属性值为 True,则将字体格式设为下标。该属性返回 True、False 或 wdUndefined(当返回值既可为 True,也可为 False 时取该值)。该属性可设为 True、False 或 wdToggle。Long类型,可读写。
expression.Subscript
expression 必需。该表达式返回一个 Font 对象。
如果将 Subscript 属性设为 True,则会将 Superscript 属性设为 False,反之亦然。
本示例在活动文档的开头插入文本,并将第十个字符设为下标。
Set myRange = ActiveDocument.Range(Start:=0, End:=0)
myRange.InsertAfter "Water = H20"
myRange.Characters(10).Font.Subscript = True
本示例检查所选文本的下标格式。
If Selection.Type = wdSelectionNormal Then
mySel = Selection.Font.Subscript
If mySel = wdUndefined Or mySel = True Then
MsgBox "Subscript text exists in the selection."
Else
MsgBox "No subscript text in the selection."
End If
Else
MsgBox "You need to select some text."
End If