Selection.Fields Property

Word Developer Reference

Returns a read-only Fields collection that represents all the fields in the selection.

Syntax

expression.Fields

expression   Required. A variable that represents a Selection object.

Example

This example adds a DATE field at the insertion point.

Visual Basic for Applications
  With Selection
    .Collapse Direction:=wdCollapseStart
    .Fields.Add Range:=Selection.Range, Type:=wdFieldDate
End With

See Also