Compartilhar via


Field.DoClick Method

Word Developer Reference

Clicks the specified field.

Syntax

expression.DoClick

expression   Required. A variable that represents a Field object.

Remarks

If the field is a GOTOBUTTON field, this method moves the insertion point to the specified location or selects the specified bookmark. If the field is a MACROBUTTON field, this method runs the specified macro. If the field is a HYPERLINK field, this method jumps to the target location.

Example

If the first field in the selection is a GOTOBUTTON field, this example clicks it (the insertion point is moved to the specified location, or the specified bookmark is selected).

Visual Basic for Applications
  Dim fldTemp

Set fldTemp = Selection.Fields(1) If fldTemp.Type = wdFieldGoToButton Then fldTemp.DoClick

See Also