本示例更新活动文档中的所有域。

'返回 0(零)值表明更新域时没有出错。
If ActiveDocument.Fields.Update = 0 Then
    MsgBox "Update Successful"
Else
    MsgBox "Field " & ActiveDocument.Fields.Update & _
        " has an error"
End If