TX Text Control .NET for WPF

LoadTemplateFromMemory Method

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

Description

Loads a template from memory that is used for the merge process.

Syntax

public bool LoadTemplateFromMemory(object template, FileFormat documentFormat);

Parameters

ParameterDescription
template

Specifies a template memory variable from which the data is loaded.

documentFormat

Specifies one of the DocumentServer.FileFormat values.

Return Value

Returns true, if the template could be loaded successfully and false, if the template is invalid or could not be loaded properly.

Examples

The following example uses Load Template From Memory in a focused Mail Merge workflow.

if (mailMerge.LoadTemplateFromMemory("Approved", TXTextControl.DocumentServer.FileFormat.MSWord))
{
    Console.WriteLine("Load Template From Memory completed successfully.");
}