MergeField Class
- Namespace
TXTextControl.DocumentServer. Fields
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WPF. SDK
- Assembly
TXDocumentServer.dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WPF. SDK TXDocumentServer.from the setup.dll
- Inherits
- Field
Adapter - Mail
Merge Field Adapter - Merge
Field
- Field
Description
The MergeField class implements the MS Word specific MERGEFIELD field. This field must be used in combination with an ApplicationField that should be modified using this adapter.
Syntax
public sealed class MergeField : MailMergeFieldAdapterPublic NotInheritable Class MergeField
Inherits MailMergeFieldAdapterExamples
The following example creates a Merge Field instance and configures its name setting for a document workflow.
TXTextControl.DocumentServer.Fields.MergeField mergeField = new();
mergeField.Name = "MergeField1";Dim mergeField As New TXTextControl.DocumentServer.Fields.MergeField()
mergeField.Name = "MergeField1"Members
Constructors
| Constructor | Description |
|---|---|
| MailMergeFieldAdapter | Initializes a new instance of the MailMergeFieldAdapter class. (Inherited from MailMergeFieldAdapter.) |
| MergeField | Initializes a new instance of the MergeField class. |
Properties
| Property | Description |
|---|---|
| DataSourceCulture | Specifies the culture with which numerical and date / time values coming from the data source are parsed. The default value for this property is the current thread culture. |
| DateTimeFormat | Specifies a string format which is applied to date / time values. Is equivalent to the MS Word field flag “\@”. |
| Mapped | Specifies whether the field is a mapped field. |
| MergeCulture | Specifies the culture with which numerical and date / time values are formatted when merged into the target document. The default value for this property is the current thread culture. |
| Name | Gets and sets the name of the field. |
| NumericFormat | Specifies a string format which is applied to numeric values. Is equivalent to the MS Word field flag “\#”. |
| PreserveFormatting | Specifies whether the field's formatting should be preserved. (Inherited from MailMergeFieldAdapter.) |
| Text | Gets and sets the text of the field. |
| TextAfter | Gets and sets the text of the field that is displayed after the field's text. |
| TextBefore | Gets and sets the text of the field that is displayed before the field's text. |
| TextFormat | Gets and sets the text format of the field. |
| VerticalFormatting | Specifies whether the field's formatting is vertical. |
Fields
| Field | Description |
|---|---|
| TYPE_NAME | Not described in the reference. public const string TYPE_NAME = "MERGEFIELD"; |