FieldChar Class |
Namespace: Aspose.Words.Fields
The FieldChar type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Document |
Gets the document to which this node belongs.
(Inherited from Node.) |
![]() ![]() | FieldType |
Returns the type of the field.
|
![]() ![]() | Font |
Provides access to the font formatting of this object.
(Inherited from Inline.) |
![]() ![]() | IsComposite |
Returns true if this node can contain other nodes.
(Inherited from Node.) |
![]() ![]() | IsDeleteRevision |
Returns true if this object was deleted in Microsoft Word while change tracking was enabled.
(Inherited from Inline.) |
![]() ![]() | IsDirty |
Gets or sets whether the current result of the field is no longer correct (stale) due to other modifications
made to the document.
|
![]() ![]() | IsFormatRevision |
Returns true if formatting of the object was changed in Microsoft Word while change tracking was enabled.
(Inherited from Inline.) |
![]() ![]() | IsInsertRevision |
Returns true if this object was inserted in Microsoft Word while change tracking was enabled.
(Inherited from Inline.) |
![]() ![]() | IsLocked |
Gets or sets whether the parent field is locked (should not recalculate its result).
|
![]() ![]() | IsMoveFromRevision |
Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.
(Inherited from Inline.) |
![]() ![]() | IsMoveToRevision |
Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.
(Inherited from Inline.) |
![]() ![]() | NextSibling |
Gets the node immediately following this node.
(Inherited from Node.) |
![]() ![]() | NodeType |
Returns NodeType.SpecialChar.
(Inherited from SpecialChar.) |
![]() ![]() | ParentNode |
Gets the immediate parent of this node.
(Inherited from Node.) |
![]() ![]() | ParentParagraph |
Retrieves the parent Paragraph of this node.
(Inherited from Inline.) |
![]() ![]() | PreviousSibling |
Gets the node immediately preceding this node.
(Inherited from Node.) |
![]() ![]() | Range |
Returns a Range object that represents the portion of a document that is contained in this node.
(Inherited from Node.) |
Name | Description | |
---|---|---|
![]() | Accept |
Accepts a visitor.
(Inherited from SpecialChar.) |
![]() ![]() | Clone | (Inherited from Node.) |
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetAncestor(Type) |
Gets the first ancestor of the specified object type.
(Inherited from Node.) |
![]() ![]() | GetAncestor(NodeType) |
Gets the first ancestor of the specified NodeType.
(Inherited from Node.) |
![]() ![]() | GetField |
Returns a field for the field char.
|
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetText |
Gets the special character that this node represents.
(Inherited from SpecialChar.) |
![]() | GetType | (Inherited from Object.) |
![]() ![]() | NextPreOrder |
Gets next node according to the pre-order tree traversal algorithm.
(Inherited from Node.) |
![]() ![]() | PreviousPreOrder |
Gets the previous node according to the pre-order tree traversal algorithm.
(Inherited from Node.) |
![]() ![]() | Remove |
Removes itself from the parent.
(Inherited from Node.) |
![]() | ToString | (Inherited from Object.) |
![]() ![]() | ToString(SaveFormat) |
Exports the content of the node into a string in the specified format.
(Inherited from Node.) |
![]() ![]() | ToString(SaveOptions) |
Exports the content of the node into a string using the specified save options.
(Inherited from Node.) |
A complete field in a Microsoft Word document is a complex structure consisting of a field start character, field code, field separator character, field result and field end character. Some fields only have field start, field code and field end.
To easily insert a new field into a document, use the InsertField(String) method.
Document doc = new Document(MyDir + "Table of contents.docx"); FieldChar fieldStart = (FieldChar)doc.GetChild(NodeType.FieldStart, 0, true); Assert.AreEqual(FieldType.FieldTOC, fieldStart.FieldType); Assert.AreEqual(false, fieldStart.IsDirty); Assert.AreEqual(false, fieldStart.IsLocked); // Retrieve the facade object which represents the field in the document Field field = fieldStart.GetField(); Assert.AreEqual(false, field.IsLocked); Assert.AreEqual(" TOC \\o \"1-3\" \\h \\z \\u ", field.GetFieldCode()); // This updates only this field in the document. field.Update();