Selection 属性 (Word)Selection.Type property (Word)

返回选择类型。Returns the selection type. 只读的**WdSelectionType**。Read-only WdSelectionType.

语法Syntax

表达式类型expression.Type

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

示例Example

如果所选内容不是插入点,则本示例将所选内容的格式设为阴文。This example formats the selection as engraved if the selection is not an insertion point.

If Selection.Type <> wdSelectionIP Then 
 Selection.Font.Engrave = True 
Else 
 MsgBox "You need to select some text." 
End If

另请参阅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.