Fields.Update method (Word)

Updates the result of the fields object.

Syntax

expression.Update

expression Required. A variable that represents a 'Fields' collection.

Return value

Long

Remarks

Returns 0 (zero) if no errors occur when the fields are updated, or returns a Long that represents the index of the first field that contains an error.

Remark: When using this with Word 2016 and possibly with others, the number may be incorrect.

Example

This example updates all the fields in the main story (that is, the main body) of the active document. A return value of 0 (zero) indicates that the fields were updated without error.

If ActiveDocument.Fields.Update = 0 Then 
 MsgBox "Update Successful" 
Else 
 MsgBox "Field " & ActiveDocument.Fields.Update & _ 
 " has an error" 
End If

See also

Fields Collection 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.