Click or drag to resize

MergeField Class

Represents a merge field in a document that can be replaced with data from a data source during the merge process.
Inheritance Hierarchy

Namespace: Spire.Doc.Fields
Assembly: Spire.Doc (in Spire.Doc.dll) Version: 13.2.3.0 (13.2.3.3046)
Syntax
public class MergeField : Field, IMergeField, 
	IField, ITextRange, IParagraphBase, IDocumentObject

The MergeField type exposes the following members.

Constructors
Name Description
Public method MergeField
Initializes a new instance of the MergeField class.
Top
Properties
Name Description
Public property CharacterFormat
Gets the character format.
(Inherited from ParagraphBase .)
Public property ChildObjects
Gets the child objects of the entity.
(Inherited from ParagraphBase .)
Public property Code
Gets or sets the field code.
(Inherited from Field .)
Public property DateFormat
Gets the date format.
Public property DeleteRevision
Gets the delete revision for this objects. Note this can be null. If null does not have delete revision.
(Inherited from ParagraphBase .)
Public property Document
Gets the document.
(Inherited from OwnerHolder .)
Public property DocumentObjectType
Gets the type of the document object.
(Overrides Field DocumentObjectType .)
Public property End
Gets or sets the field end.
(Inherited from Field .)
Public property FieldName
Returns or sets field name
Public property FieldText
Gets or Sets Filed Displays text information.
(Inherited from Field .)
Public property FirstChild
Gets the first child of the Element.
(Inherited from DocumentObject .)
Public property InsertRevision
Gets the insert revision for this objects. Note this can be null. If null does not have insert revision.
(Inherited from ParagraphBase .)
Public property IsComposite
Indicating whether this instance is composite.
(Inherited from DocumentObject .)
Public property IsDeleteRevision
Gets or set a value indicating whether this item was deleted from the document, when "Track Changes" is or was set to "true".
(Inherited from ParagraphBase .)
Public property IsInsertRevision
Gets a value indicating whether this item was inserted to the document, when "Track Changes" is or was set to "true".
(Inherited from ParagraphBase .)
Public property IsLocked
Gets or sets the lock property of the filed.if the field is locked,the field can't be updated.
(Inherited from Field .)
Public property LastChild
Gets the last child of the Element.
(Inherited from DocumentObject .)
Public property NextSibling
Gets the next sibling.
(Inherited from DocumentObject .)
Public property NumberFormat
Gets the number format.
Public property Owner
Gets the owner of this entity.
(Inherited from DocumentObject .)
Public property OwnerParagraph
Gets owner paragraph.
(Inherited from ParagraphBase .)
Public property Pattern
Returns or sets field pattern.
(Inherited from Field .)
Public property Prefix
Gets the prefix of merge field.
Public property PreviousSibling
Gets the previous sibling.
(Inherited from DocumentObject .)
Public property Separator
Gets or sets the field separator.
(Inherited from Field .)
Public property StyleName
Gets the style name.
(Inherited from ParagraphBase .)
Public property Text
Gets or sets the text associated with this object.
(Overrides TextRange Text .)
Public property TextAfter
Returns or sets the text after merge field
Public property TextBefore
Returns or sets the text before merge field
Public property TextFormat
Gets or sets regular text format.
(Inherited from Field .)
Public property TextItems
Gets the text items.
Public property Type
Returns or sets field type
(Inherited from Field .)
Public property Value
Gets the field value.
(Inherited from Field .)
Protected property XDLSHolder (Inherited from DocumentSerializable .)
Top
Methods
Name Description
Public method ApplyCharacterFormat
Applies the specified character format to the current object.
(Inherited from ParagraphBase .)
Public method ApplyStyle
Applies the specified character style to the current object. If the specified style does not exist and the style name is "default paragraph font", a new built-in style is created and added to the document. If the specified style still cannot be found, an ArgumentException is thrown.
(Inherited from ParagraphBase .)
Public method Clone
Creates a duplicate of the document object.
(Inherited from DocumentObject .)
Protected method CloneImpl (Inherited from Field .)
Protected method ConvertSwitchesToString (Overrides Field ConvertSwitchesToString .)
Protected method CreateLayoutInfo (Overrides Field CreateLayoutInfo .)
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object .)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object .)
Protected method GetCultureInfo (Inherited from Field .)
Protected method GetCultureInfo(Int32) (Inherited from Field .)
Public method GetFieldCode
Gets the field code.
(Inherited from Field .)
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object .)
Public method GetNextWidgetSibling
Gets the next widget sibling.
(Inherited from ParagraphBase .)
Public method GetPreviousWidgetSibling
Gets the previous widget sibling.
(Inherited from ParagraphBase .)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object .)
Protected method InitXDLSHolder (Inherited from TextRange .)
Protected method MemberwiseClone
Creates a shallow copy of the current Object .
(Inherited from Object .)
Protected method ParseField (Inherited from Field .)
Protected method ParseFieldCode (Overrides Field ParseFieldCode(String) .)
Protected method ParseFieldFormat (Inherited from Field .)
Protected method ReadXmlAttributes (Overrides Field ReadXmlAttributes(IXDLSAttributeReader) .)
Protected method ReadXmlContent (Inherited from TextRange .)
Protected method RestoreReference (Inherited from DocumentSerializable .)
Public method ToString
Returns a string that represents the current object.
(Inherited from Object .)
Public method ToString(String)
Exports the name and index in container of the object into a string in the specified seperator.
(Inherited from DocumentObject .)
Public method Update
Update the result of the field. Can only be simpler field. Direct calls cannot update the NumPages field and Page field, ect.
(Inherited from Field .)
Protected method UpdateFieldCode (Overrides Field UpdateFieldCode(String) .)
Protected method WriteXmlAttributes (Overrides Field WriteXmlAttributes(IXDLSAttributeWriter) .)
Protected method WriteXmlContent (Inherited from TextRange .)
Top
Fields
Name Description
Protected field m_bConvertedToText (Inherited from Field .)
Protected field m_doc (Inherited from OwnerHolder .)
Protected field m_fieldName
Protected field m_fieldType (Inherited from Field .)
Protected field m_fieldValue (Inherited from Field .)
Protected field m_formattingString (Inherited from Field .)
Protected field m_paraItemType (Inherited from Field .)
Protected field m_textFormat (Inherited from Field .)
Top
See Also