SmallCaps 属性

       

如果为 True,则将字体设置为小型大写字母。返回 TrueFalse wdUndefined(当返回值既可为 True 也可为 False 时取该值)。该属性可设置为 TrueFalse wdToggleLong 类型,可读写。

expression.SmallCaps

expression   必需。该表达式返回一个 Font 对象。

说明

如果将 SmallCaps 属性设为 True,则会将 AllCaps 属性设为 False,反之亦然。

示例

本示例区分新文档中小型大写字母和全部大写字母之间的差别。

Set myRange = Documents.Add.Content
With myRange
    .InsertAfter "This is a demonstration of SmallCaps."
    .Words(6).Font.SmallCaps = True
    .InsertParagraphAfter
    .InsertAfter "This is a demonstration of AllCaps."
    .Words(14).Font.AllCaps = True
End With

如果部分选定内容中的字体格式已设置为小型大写字母格式,本示例将整个选定内容的字体格式设置为小型大写字母格式。

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