MailMerge Class |
|
The MailMerge class is a .NET component that can be used to effortlessly merge template documents with database content in .NET projects, such as ASP.NET web applications, web services or Windows services. The MailMerge class can be found in the TXTextControl.DocumentServer namespace. It is inherited from the System.ComponentModel.Component class. The following describes only the properties and methods defined through the MailMerge class. For a list of properties, methods and events inherited from the System.ComponentModel.Component class see the .NET Framework reference. |
|
| Syntax: |
|
[C#]
public class MailMerge : Component
[Visual Basic]
Public Class MailMerge
Inherits Component
|
| Introduced: |
|
14.0
|
Constructors |
| Constructor |
|
Description |
|
| |
| MailMerge |
|
Initializes a new instance of the MailMerge class.
|
Properties |
| Property |
|
Description |
|
| |
| RemoveEmptyFields |
|
Specifies whether empty fields should be removed from the template or not.
|
| TextComponent |
|
Gets or sets the TextComponent object of type ServerTextControl that is associated with the MailMerge component.
|
| UseTemplateFormat |
|
Specifies whether the template page size and margins should be used or not.
|
Methods |
| Method |
|
Description |
|
| |
| LoadTemplate |
|
Loads a template from a file that is used for the merge process.
|
| LoadTemplateFromMemory |
|
Loads a template from memory that is used for the merge process.
|
| Merge |
|
Merges the loaded template with the data of a specific System.Data.DataTable.
|
| MergeBlocks |
|
Merges all repeating blocks that are contained in the loaded template with the System.Data.DataTable instances contained in the given System.Data.DataSet.
|
| Print |
|
Prints the merged document.
|
| SaveDocument |
|
Saves the merged document to a file.
|
| SaveDocumentToMemory |
|
Saves the merged document to a byte array or as a string.
|
Events |
| Event |
|
Description |
|
| |
| BlockRowMerged |
|
Occurs when a merge block row has been merged successfully.
|
| DataRowMerged |
|
Occurs when a data row has been merged successfully.
|
|
| See also: |
|
Mail Merge, Graphical Overview. |