TX Text Control .NET Server

SaveDocument Method

Method|Introduced in 14.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

Saves the merged document to a file.

Syntax

public void SaveDocument(string fileName, StreamType fileFormat, SaveSettings saveSettings);

Parameters

ParameterDescription
fileName

Specifies a file into which the data is saved. If the file does not exist, it is created. If the file exists, its contents are overwritten.

fileFormat

Specifies one of the StreamType values.

saveSettings

Specifies a SaveSettings object with additional information and settings for the save operation.

Examples

The following example uses Save Document in a focused Mail Merge workflow. The created object is then available to the surrounding document workflow.

mailMerge.SaveDocument("document.docx", StreamType.WordprocessingML, new SaveSettings());
Console.WriteLine("Mail Merge is ready for use.");