Upravit

Sdílet prostřednictvím


Selection.NextField method (Word)

Selects the next field.

Syntax

expression. NextField

expression Required. A variable that represents a Selection object.

Return value

Field

Remarks

If this method finds a field, it returns a Field object; if not, it returns Nothing.

Example

This example updates the next field in the selection.

If Not (Selection.NextField Is Nothing) Then 
 Selection.Fields.Update 
End If

This example selects the next field in the selection, and if a field is found, displays a message in the status bar.

Set myField = Selection.NextField 
If Not (myField Is Nothing) Then StatusBar = "Field found"

See also

Selection Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.