DoClick Method

Applies To

Field object.

Description

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.

Syntax

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

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