LoadTemplateFromMemory Method
- Namespace
TXTextControl.DocumentServer
- Package
TXTextControl.asTextControl. WinForms. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline Packagesdll
Description
Loads a template from memory that is used for the merge process.
Syntax
public bool LoadTemplateFromMemory(object template, FileFormat documentFormat);Public Function LoadTemplateFromMemory(template As Object, documentFormat As FileFormat) As BooleanParameters
| Parameter | Description |
|---|---|
| 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.");
}If mailMerge.LoadTemplateFromMemory("Approved", TXTextControl.DocumentServer.FileFormat.MSWord) Then
Console.WriteLine("Load Template From Memory completed successfully.")
End If