TX Text Control .NET for Windows Forms

RemoveEmptyBlocks Property

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

Description

Specifies whether the content of empty merge blocks should be removed from the template or not. The default value is true.

Syntax

public bool RemoveEmptyBlocks { get; set; }

Examples

The following example uses MailMerge.RemoveEmptyBlocks to configure remove empty blocks as part of the mail merge workflow. The configured value is checked before the workflow continues.

mailMerge.RemoveEmptyBlocks = true;
if (mailMerge.RemoveEmptyBlocks)
{
    Console.WriteLine("Mail Merge: Remove Empty Blocks is enabled.");
}

Further Reading