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
Syntaxpublic Field BuildAndInsert(
Inline refNode
)
Public Function BuildAndInsert (
refNode As Inline
) As Field
public:
Field^ BuildAndInsert(
Inline^ refNode
)
member BuildAndInsert :
refNode : Inline -> Field
Parameters
- refNode
- Type: Aspose.WordsInline
Return Value
Type:
FieldA
Field object that represents the inserted field.
ExamplesBuilds 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