TX Text Control .NET for WPF

GetBlockFieldNames Method

Method|Introduced in 19.0
Namespace
TXTextControl.DocumentServer
Package
TXTextControl.TextControl.WPF.SDK as TXDocumentServer.dll from the private NuGet feed or Text Control Offline Packages

Description

Returns the names of all merge fields inside the merge block with the specified name.

Syntax

public string[] GetBlockFieldNames(string blockName);

Parameters

ParameterDescription
blockName

Specifies the name of the block for which the field names are returned.

Return Value

Returns an array of strings specifying the field names.

Examples

The following example retrieves block field names from the mail merge.

string[] results = mailMerge.GetBlockFieldNames("CustomerName");
foreach (string text in results)
{
    Console.WriteLine(text);
}