insertField method

insertField(fieldType, updateField, refNode, isAfter)

Inserts a field into this paragraph.

insertField(fieldType: Aspose.Words.Fields.FieldType, updateField: boolean, refNode: Aspose.Words.Node, isAfter: boolean)
ParameterTypeDescription
fieldTypeFieldTypeThe type of the field to insert.
updateFieldbooleanSpecifies whether to update the field immediately.
refNodeNodeReference node inside this paragraph (if refNode isnull, then appends to the end of the paragraph).
isAfterbooleanWhether to insert the field after or before reference node.

Returns

A Field object that represents the inserted field.

insertField(fieldCode, refNode, isAfter)

Inserts a field into this paragraph.

insertField(fieldCode: string, refNode: Aspose.Words.Node, isAfter: boolean)
ParameterTypeDescription
fieldCodestringThe field code to insert (without curly braces).
refNodeNodeReference node inside this paragraph (if refNode isnull, then appends to the end of the paragraph).
isAfterbooleanWhether to insert the field after or before reference node.

Returns

A Field object that represents the inserted field.

insertField(fieldCode, fieldValue, refNode, isAfter)

Inserts a field into this paragraph.

insertField(fieldCode: string, fieldValue: string, refNode: Aspose.Words.Node, isAfter: boolean)
ParameterTypeDescription
fieldCodestringThe field code to insert (without curly braces).
fieldValuestringThe field value to insert. Pass null for fields that do not have a value.
refNodeNodeReference node inside this paragraph (if refNode isnull, then appends to the end of the paragraph).
isAfterbooleanWhether to insert the field after or before reference node.

Returns

A Field object that represents the inserted field.

See Also