Share via


DoClick Method

Clicks the specified field. 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.

expression.DoClick

expression Required. An expression that returns a Field object.

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).

Dim fldTemp

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

Applies to | Field Object