TX Text Control .NET Server

MailMergeFieldAdapter Class

Class|Introduced in 15.0
Namespace
TXTextControl.DocumentServer.Fields
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDocumentServer.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXDocumentServer.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXDocumentServer.dll
Inherits
  1. FieldAdapter
  2. MailMergeFieldAdapter
Derived
DateField, IfField, IncludeText, MergeField, NextField, NextIfField

Description

The abstract MailMergeFieldAdapter class is the base class of all special DocumentServer mail merge field adapters. It implements the necessary means to access field properties.

Syntax

public abstract class MailMergeFieldAdapter : FieldAdapter

Examples

The following example includes the preserve formatting value from a Mail Merge Field Adapter object in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Preserve Formatting: {mailMergeFieldAdapter.PreserveFormatting}");
Console.WriteLine("Mail Merge Field Adapter is ready for use.");

Members

Constructors

ConstructorDescription
FieldAdapterInitializes a new instance of the FieldAdapter class. (Inherited from FieldAdapter.)
MailMergeFieldAdapterInitializes a new instance of the MailMergeFieldAdapter class.

Properties

PropertyDescription
ApplicationFieldGets the adapted ApplicationField of the field. Each special field acts like an adapter for the specific ApplicationField. (Inherited from FieldAdapter.)
IDGets the ID of the specific field through its adapter. (Inherited from FieldAdapter.)
LengthGets the number of characters in a text field through its adapter. (Inherited from FieldAdapter.)
PreserveFormattingSpecifies whether the field's formatting should be preserved.
StartGets the first character position (one-based) of the field through its adapter. (Inherited from FieldAdapter.)
TypeNameGets the field's type name of the specific field through its adapter. For example for the type name of a Microsoft Word MergeField is MERGEFIELD. If the type name of the field is changed, its parameters must also be changed. (Inherited from FieldAdapter.)

Methods

MethodDescription
ShowDialogOpens the specific field options dialog box. (Inherited from FieldAdapter.)

Fields

FieldDescription
TYPE_NAMERepresents the name of the respective field type. Every subclass of FieldAdapter overwrites this with its respective type name. (Inherited from FieldAdapter.)