Class MailMerger
Namespace: Aspose.Words.LowCode
Assembly: Aspose.Words.dll (25.4.0)
Provides methods intended to fill template with data using simple mail merge and mail merge with regions operations.
public class MailMerger : Processor
Inheritance
object ← Processor ← MailMerger
Inherited Members
Processor.mResultDocument , Processor.From(string, LoadOptions) , Processor.From(Stream, LoadOptions) , Processor.To(string, SaveOptions) , Processor.To(string, SaveFormat) , Processor.To(Stream, SaveOptions) , Processor.To(Stream, SaveFormat) , Processor.To(List<stream>, SaveOptions) , Processor.To(List<stream>, SaveFormat) , Processor.Execute() , Processor.ExecuteCore() , Processor.CheckArgumentsSet() , Processor.GetPartFileName(string, int, SaveFormat) , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Methods
Create(MailMergerContext)
Creates new instance of the mail merger processor.
public static MailMerger Create(MailMergerContext context)
Parameters
context
MailMergerContext
Returns
Execute(string, string, string[], object[])
Performs a mail merge operation for a single record.
public static void Execute(string inputFileName, string outputFileName, string[] fieldNames, object[] fieldValues)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
fieldNames
string
[]
Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
fieldValues
object
[]
Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(string, string, SaveFormat, string[], object[], MailMergeOptions)
Performs a mail merge operation for a single record.
public static void Execute(string inputFileName, string outputFileName, SaveFormat saveFormat, string[] fieldNames, object[] fieldValues, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveFormat
SaveFormat
The output’s save format.
fieldNames
string
[]
Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
fieldValues
object
[]
Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(string, string, SaveOptions, string[], object[], MailMergeOptions)
Performs a mail merge operation for a single record.
public static void Execute(string inputFileName, string outputFileName, SaveOptions saveOptions, string[] fieldNames, object[] fieldValues, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveOptions
SaveOptions
The output’s save options.
fieldNames
string
[]
Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
fieldValues
object
[]
Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(Stream, Stream, SaveFormat, string[], object[], MailMergeOptions)
Performs a mail merge operation for a single record.
public static void Execute(Stream inputStream, Stream outputStream, SaveFormat saveFormat, string[] fieldNames, object[] fieldValues, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveFormat
SaveFormat
The output’s save format.
fieldNames
string
[]
Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
fieldValues
object
[]
Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Execute(Stream, Stream, SaveOptions, string[], object[], MailMergeOptions)
Performs a mail merge operation for a single record.
public static void Execute(Stream inputStream, Stream outputStream, SaveOptions saveOptions, string[] fieldNames, object[] fieldValues, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveOptions
SaveOptions
The output’s save options.
fieldNames
string
[]
Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
fieldValues
object
[]
Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Execute(string, string, DataRow)
Performs mail merge from a DataRow into the document.
public static void Execute(string inputFileName, string outputFileName, DataRow dataRow)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
dataRow
DataRow
Row that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(string, string, SaveFormat, DataRow, MailMergeOptions)
Performs mail merge from a DataRow into the document.
public static void Execute(string inputFileName, string outputFileName, SaveFormat saveFormat, DataRow dataRow, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveFormat
SaveFormat
The output’s save format.
dataRow
DataRow
Row that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(string, string, SaveOptions, DataRow, MailMergeOptions)
Performs mail merge from a DataRow into the document.
public static void Execute(string inputFileName, string outputFileName, SaveOptions saveOptions, DataRow dataRow, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveOptions
SaveOptions
The output’s save options.
dataRow
DataRow
Row that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(Stream, Stream, SaveFormat, DataRow, MailMergeOptions)
Performs a mail merge operation for a single record.
public static void Execute(Stream inputStream, Stream outputStream, SaveFormat saveFormat, DataRow dataRow, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveFormat
SaveFormat
The output’s save format.
dataRow
DataRow
Row that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Execute(Stream, Stream, SaveOptions, DataRow, MailMergeOptions)
Performs a mail merge operation for a single record.
public static void Execute(Stream inputStream, Stream outputStream, SaveOptions saveOptions, DataRow dataRow, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveOptions
SaveOptions
The output’s save options.
dataRow
DataRow
Row that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Execute(string, string, DataTable)
Performs mail merge from a DataTable into the document.
public static void Execute(string inputFileName, string outputFileName, DataTable dataTable)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(string, string, SaveFormat, DataTable, MailMergeOptions)
Performs mail merge from a DataRow into the document.
public static void Execute(string inputFileName, string outputFileName, SaveFormat saveFormat, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveFormat
SaveFormat
The output’s save format.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(string, string, SaveOptions, DataTable, MailMergeOptions)
Performs mail merge from a DataRow into the document.
public static void Execute(string inputFileName, string outputFileName, SaveOptions saveOptions, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveOptions
SaveOptions
The output’s save options.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Execute(Stream, Stream, SaveFormat, DataTable, MailMergeOptions)
Performs a mail merge operation for a single record.
public static void Execute(Stream inputStream, Stream outputStream, SaveFormat saveFormat, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveFormat
SaveFormat
The output’s save format.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Execute(Stream, Stream, SaveOptions, DataTable, MailMergeOptions)
Performs a mail merge operation for a single record.
public static void Execute(Stream inputStream, Stream outputStream, SaveOptions saveOptions, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveOptions
SaveOptions
The output’s save options.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
ExecuteCore()
protected override void ExecuteCore()
ExecuteToImages(string, ImageSaveOptions, string[], object[], MailMergeOptions)
Performs a mail merge operation for a single record and renders the result to images.
public static Stream[] ExecuteToImages(string inputFileName, ImageSaveOptions saveOptions, string[] fieldNames, object[] fieldValues, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
saveOptions
ImageSaveOptions
The output’s save options.
fieldNames
string
[]
Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
fieldValues
object
[]
Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteToImages(Stream, ImageSaveOptions, string[], object[], MailMergeOptions)
Performs a mail merge operation for a single record and renders the result to images.
public static Stream[] ExecuteToImages(Stream inputStream, ImageSaveOptions saveOptions, string[] fieldNames, object[] fieldValues, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
saveOptions
ImageSaveOptions
The output’s save options.
fieldNames
string
[]
Array of merge field names. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
fieldValues
object
[]
Array of values to be inserted into the merge fields. Number of elements in this array must be the same as the number of elements in fieldNames.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteToImages(string, ImageSaveOptions, DataRow, MailMergeOptions)
Performs mail merge from a DataRow into the document and renders the result to images.
public static Stream[] ExecuteToImages(string inputFileName, ImageSaveOptions saveOptions, DataRow dataRow, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
saveOptions
ImageSaveOptions
The output’s save options.
dataRow
DataRow
Row that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteToImages(Stream, ImageSaveOptions, DataRow, MailMergeOptions)
Performs mail merge from a DataRow into the document and renders the result to images.
public static Stream[] ExecuteToImages(Stream inputStream, ImageSaveOptions saveOptions, DataRow dataRow, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
saveOptions
ImageSaveOptions
The output’s save options.
dataRow
DataRow
Row that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteToImages(string, ImageSaveOptions, DataTable, MailMergeOptions)
Performs mail merge from a DataRow into the document and renders the result to images.
public static Stream[] ExecuteToImages(string inputFileName, ImageSaveOptions saveOptions, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
saveOptions
ImageSaveOptions
The output’s save options.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteToImages(Stream, ImageSaveOptions, DataTable, MailMergeOptions)
Performs mail merge from a DataRow into the document and renders the result to images.
public static Stream[] ExecuteToImages(Stream inputStream, ImageSaveOptions saveOptions, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
saveOptions
ImageSaveOptions
The output’s save options.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteWithRegions(string, string, DataTable)
Performs mail merge from a DataTable into the document with mail merge regions.
public static void ExecuteWithRegions(string inputFileName, string outputFileName, DataTable dataTable)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
dataTable
DataTable
Data source for the mail merge operation. The table must have its TableName property set.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
ExecuteWithRegions(string, string, SaveFormat, DataTable, MailMergeOptions)
Performs mail merge from a DataTable into the document with mail merge regions.
public static void ExecuteWithRegions(string inputFileName, string outputFileName, SaveFormat saveFormat, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveFormat
SaveFormat
The output’s save format.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
ExecuteWithRegions(string, string, SaveOptions, DataTable, MailMergeOptions)
Performs mail merge from a DataTable into the document with mail merge regions.
public static void ExecuteWithRegions(string inputFileName, string outputFileName, SaveOptions saveOptions, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveOptions
SaveOptions
The output’s save options.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
ExecuteWithRegions(Stream, Stream, SaveFormat, DataTable, MailMergeOptions)
Performs a mail merge operation for a single record.
public static void ExecuteWithRegions(Stream inputStream, Stream outputStream, SaveFormat saveFormat, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveFormat
SaveFormat
The output’s save format.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
ExecuteWithRegions(Stream, Stream, SaveOptions, DataTable, MailMergeOptions)
Performs a mail merge operation for a single record.
public static void ExecuteWithRegions(Stream inputStream, Stream outputStream, SaveOptions saveOptions, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveOptions
SaveOptions
The output’s save options.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
ExecuteWithRegions(string, string, DataSet)
Performs mail merge from a DataSet into a document with mail merge regions.
public static void ExecuteWithRegions(string inputFileName, string outputFileName, DataSet dataSet)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
dataSet
DataSet
DataSet that contains data to be inserted into mail merge fields.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
ExecuteWithRegions(string, string, SaveFormat, DataSet, MailMergeOptions)
Performs mail merge from a DataSet into the document with mail merge regions.
public static void ExecuteWithRegions(string inputFileName, string outputFileName, SaveFormat saveFormat, DataSet dataSet, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveFormat
SaveFormat
The output’s save format.
dataSet
DataSet
DataSet that contains data to be inserted into mail merge fields.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
ExecuteWithRegions(string, string, SaveOptions, DataSet, MailMergeOptions)
Performs mail merge from a DataSet into the document with mail merge regions.
public static void ExecuteWithRegions(string inputFileName, string outputFileName, SaveOptions saveOptions, DataSet dataSet, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveOptions
SaveOptions
The output’s save options.
dataSet
DataSet
DataSet that contains data to be inserted into mail merge fields.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
ExecuteWithRegions(Stream, Stream, SaveFormat, DataSet, MailMergeOptions)
Performs mail merge from a DataSet into the document with mail merge regions.
public static void ExecuteWithRegions(Stream inputStream, Stream outputStream, SaveFormat saveFormat, DataSet dataSet, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveFormat
SaveFormat
The output’s save format.
dataSet
DataSet
DataSet that contains data to be inserted into mail merge fields.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
ExecuteWithRegions(Stream, Stream, SaveOptions, DataSet, MailMergeOptions)
Performs mail merge from a DataSet into the document with mail merge regions.
public static void ExecuteWithRegions(Stream inputStream, Stream outputStream, SaveOptions saveOptions, DataSet dataSet, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
outputStream
Stream
The output file stream.
saveOptions
SaveOptions
The output’s save options.
dataSet
DataSet
DataSet that contains data to be inserted into mail merge fields.
mailMergeOptions
MailMergeOptions
Mail merge options.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
ExecuteWithRegionsToImages(string, ImageSaveOptions, DataTable, MailMergeOptions)
Performs mail merge from a DataTable into the document with mail merge regions and renders the result to images.
public static Stream[] ExecuteWithRegionsToImages(string inputFileName, ImageSaveOptions saveOptions, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
saveOptions
ImageSaveOptions
The output’s save options.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteWithRegionsToImages(Stream, ImageSaveOptions, DataTable, MailMergeOptions)
Performs mail merge from a DataTable into the document with mail merge regions and renders the result to images.
public static Stream[] ExecuteWithRegionsToImages(Stream inputStream, ImageSaveOptions saveOptions, DataTable dataTable, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
saveOptions
ImageSaveOptions
The output’s save options.
dataTable
DataTable
Table that contains data to be inserted into mail merge fields. Field names are not case sensitive. If a field name that is not found in the document is encountered, it is ignored.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteWithRegionsToImages(string, ImageSaveOptions, DataSet, MailMergeOptions)
Performs mail merge from a DataSet into the document with mail merge regions and renders the result to images.
public static Stream[] ExecuteWithRegionsToImages(string inputFileName, ImageSaveOptions saveOptions, DataSet dataSet, MailMergeOptions mailMergeOptions = null)
Parameters
inputFileName
string
The input file name.
saveOptions
ImageSaveOptions
The output’s save options.
dataSet
DataSet
DataSet that contains data to be inserted into mail merge fields.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream []
ExecuteWithRegionsToImages(Stream, ImageSaveOptions, DataSet, MailMergeOptions)
Performs mail merge from a DataSet into the document with mail merge regions and renders the result to images.
public static Stream[] ExecuteWithRegionsToImages(Stream inputStream, ImageSaveOptions saveOptions, DataSet dataSet, MailMergeOptions mailMergeOptions = null)
Parameters
inputStream
Stream
The input file stream.
saveOptions
ImageSaveOptions
The output’s save options.
dataSet
DataSet
DataSet that contains data to be inserted into mail merge fields.
mailMergeOptions
MailMergeOptions
Mail merge options.
Returns
Stream [] </stream></stream>