SmallCaps 属性(Word)Font.SmallCaps property (Word)

如果字体格式为小型大写字母,则该属性值为 TrueTrue if the font is formatted as small capital letters. 读/写 LongRead/write Long.


expressionexpression. SmallCaps

_表达式_一个返回**Font** 对象的表达式。expression An expression that returns a Font object.


返回truefalsewdUndefinedtrueFalse的混合)。Returns True, False or wdUndefined (a mixture of True and False). 可以设置为 wdToggleCan be set to True, False, or wdToggle.

如果将SmallCaps属性设置为True ,则**AllCaps** 属性设置为False,反之亦然。Setting the SmallCaps property to True sets the AllCaps property to False, and vice versa.


本示例区分新文档中小型大写字母和全部大写字母之间的差别。This example demonstrates the difference between small capital letters and all capital letters in a new document.

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

如果部分选定内容中的字体格式已设置为小型大写字母格式,本示例将整个选定内容的字体格式设置为小型大写字母格式。This example formats the entire selection as small capital letters if part of the selection is already formatted as small capital letters.

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

另请参阅See also

Font 对象Font Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.