TX Text Control .NET for Windows Forms

MergeFields Property

Property|Introduced in 29.0
Namespace
TXTextControl.DocumentServer.DataSources
Package
TXTextControl.TextControl.WinForms.SDK as TXDocumentServer.dll from the private NuGet feed or Text Control Offline Packages

Description

Returns the merge fields inside this merge block excluding fields in possible nested merge blocks.

Syntax

public MergeField[] MergeFields { get; }

Examples

The following example iterates through the merge fields collection and processes each merge field.

foreach (TXTextControl.DocumentServer.Fields.MergeField mergeField in mergeBlockInfo.MergeFields)
{
    mergeField.Text = "Quarterly results";
}

Limitations

Read only.

Remarks

If this property is called on a MergeBlockInfo instance that was not created from an existing SubTextPart, an exception is thrown.