选定内容。 Fields 属性 (Word)Selection.Fields property (Word)

返回一个只读的**fields** 集合, 该集合代表选定内容中的所有域。Returns a read-only Fields collection that represents all the fields in the selection.

语法Syntax

expression.expression. Fields

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

示例Example

本示例在插入点添加一个 DATE 域。This example adds a DATE field at the insertion point.

With Selection 
 .Collapse Direction:=wdCollapseStart 
 .Fields.Add Range:=Selection.Range, Type:=wdFieldDate 
End With

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