所选内容。 Style 属性 (Word)Selection.Style property (Word)

返回或设置指定对象的样式。Returns or sets the style for the specified object. 若要设置该属性, 请指定样式的本地名称、一个整数、一个WdBuiltinStyle常量或一个代表样式的对象。To set this property, specify the local name of the style, an integer, a WdBuiltinStyle constant, or an object that represents the style. 若要获取有效常量的列表,请查询“Microsoft Visual Basic 对象浏览器”。For a list of valid constants, consult the Microsoft Visual Basic Object Browser. 读/写 VariantRead/write Variant.

语法Syntax

expression.Styleexpression.Style

expression:必需。expression Required. 表示 Selection 对象的变量。A variable that represents a Selection object.

备注Remarks

如果返回包含多个样式的选定内容的样式,则只返回第一个字符样式或段落样式。When you return the style for a selection that includes more than one style, only the first character or paragraph style is returned.

另请参阅See also

Selection 对象Selection 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.