FieldBuilderBuildAndInsert Method (Inline)

Builds and inserts a field into the document before the specified inline node.

Namespace:  Aspose.Words.Fields
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public Field BuildAndInsert(
	Inline refNode
)

Parameters

refNode
Type: Aspose.WordsInline

Return Value

Type: Field
A Field object that represents the inserted field.
Examples
Builds and inserts a field into the document before the specified inline node.
Document doc = new Document();
Run run = DocumentHelper.InsertNewRun(doc, " Hello World!", 0);

FieldBuilder fieldBuilder = new FieldBuilder(FieldType.FieldRevisionNum);
fieldBuilder.BuildAndInsert(run);

doc.UpdateFields();
See Also