Field.Next Property

Word Developer Reference

Returns the next object in the collection. Read-only.

Syntax

expression.Next

expression   A variable that represents a Field object.

Example

This example updates the fields in the first section in the active document as long as the Next method returns a Field object and the field isn't a FILLIN field.

Visual Basic for Applications
  If ActiveDocument.Sections(1).Range.Fields.Count >= 1 Then
    Set myField = ActiveDocument.Fields(1)
    While Not (myField Is Nothing)
        If myField.Type <> wdFieldFillIn Then myField.Update
        Set myField = myField.Next
    Wend
End If

See Also