TX Text Control .NET Server

TemplateFile Property

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

Description

Specifies the template file path. Can be used instead of the LoadTemplate method. The document format is deduced from the file extension automatically.

Syntax

public string TemplateFile { get; set; }

Examples

The following example uses MailMerge.TemplateFile to configure template file as part of the mail merge workflow. The configured value is checked before the workflow continues.

mailMerge.TemplateFile = "document.docx";
if (!string.IsNullOrWhiteSpace(mailMerge.TemplateFile))
{
    Console.WriteLine($"Template File: {mailMerge.TemplateFile}");
}