![]() ' Create a new data set and load the XML fileĭim lsLoadSettings As TXTextControl.LoadSettings = New TXTextControl.With data merge you can easily paginate text and images in InDesign in a matter of seconds by reading an external data source file in. M_(mfMergeField.ApplicationField)Įnd Sub private void InsertMergeField(string name) Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load ' Create a new ĭim mfMergeField As = New () Private Sub InsertMergeField(ByVal name As String) The following code shows how to insert the fields into TX Text Control: An XML file is used as a data source which is also used to insert the menu items dynamically. ![]() Having loaded the sample program from the MailMerge_Simple directory, start the program and use the Add method from the Application Fields main menu to insert some fields. The following 3 samples give an overview of different options and usages. Provided that the used DataTable contains fields that matches the contained ApplicationFields, they are automatically merged and the resulting document is loaded back into TextControl. ![]() Automatically, DocumentServer.MailMerge uses the document of the connected TextControl instance as a template. Now that the MailMerge component and TextControl are connected, you can start a merge process by calling the method with an appropriate DataTable object. In the drop down list, select the TextControl instance you want to connect to the MailMerge component. Select the MailMerge instance and find the property in the Properties window. ![]() DocumentServer.MailMerge will be added to the component tray area of the Designer View. Drag and drop an instance of TextControl and MailMerge to the same form. from the File -> New main menu in order to create a new Windows Forms Application.ĭocumentServer.MailMerge is a separate component located in the TX Text Control 31.0 tab page of the Visual Studio toolbox. %USERPROFILE%\Documents\TX Text Control 31.0.NET for Windows Forms\Samples\WinForms\VB.NET\Howto\MailMerge.%USERPROFILE%\Documents\TX Text Control 31.0.NET for Windows Forms\Samples\WinForms\CSharp\Howto\MailMerge.The source code for the examples is contained in the subfolders MailMerge_Simple, MailMerge_Blocks and MailMerge_Nested_Blocks of the following directories: In the first step, this article explains how to connect the MailMerge component with an instance of TextControl. Supported fields are: MERGEFIELD, INCLUDETEXT, IF and DATE. The DocumentServer.MailMerge component supports the most important standard merge fields of MS Word. These blocks will be repeated according to the number of passed data rows. Additionally, repeating blocks can be defined in the template. Single merge fields can be inserted that will be filled with database content. Optionally, it is possible to create separate documents or to append the documents to one resulting document. The data rows of the table equals the number of created documents. It is possible to pass a DataTable containing different columns that covers the merge field names. NET System.Data namespace and exported to the supported file formats of TX Text Control like Adobe PDF or DOCX. Using the DocumentServer.MailMerge component, template documents containing MS Word merge fields can be easily loaded, merged with a DataSet or DataTable of the Microsoft. The DocumentServer.MailMerge class is part of the TXTextControl.DocumentServer namespace. The MailMerge class encapsulates powerful mail merge capabilities in a ready-to-use component. This chapter shows how to use the DocumentServer.MailMerge class in Windows Forms projects to merge TXTextControl.ApplicationFields in template documents with data from various data sources.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |