Method UpdateFields
UpdateFields(DomNode, FieldUpdateOptions?)
Evaluates every field in a subtree and writes each result between the field's separator and end characters.
public static FieldUpdateResult UpdateFields(this DomNode root, FieldUpdateOptions? options = null)
Parameters
rootDomNodeThe document or subtree to update.
optionsFieldUpdateOptionsThe update options, or null for defaults.
Returns
- FieldUpdateResult
A summary of what changed.
Remarks
Nested fields evaluate innermost-first. A field the engine cannot evaluate keeps its
cached result and reports a diagnostic — it is never blanked. Fields marked
w:fldLock are left alone unless
UpdateLockedFields says otherwise.
Exceptions
- ArgumentNullException
rootis null.- ResourceLimitExceededException
Field nesting exceeded MaxNestingDepth.