Merging files
CorelDRAW lets you combine text from a data source with a drawing. When you merge documents, you produce several different copies of a drawing. Each copy contains specific information from a record in a data source, such as a text file or an ODBC data source (a Microsoft Excel or Microsoft Access file).
When you merge documents, you combine a form document and a data source. A form document provides the pattern and layout for a merged document. A data source supplies information for a drawing during the merge. CorelDRAW supports the following data source files: Text (TXT) files, comma-separated values (CSV) files, Rich Text Format (RTF) files, and files that can be opened by means of an ODBC data source.
Data source document (1), form document (2), and merged documents (3)
Creating a data source file
Information in a data source file is organized into fields and records. A field can contain one or more characters. Fields can contain alphanumeric data or only numeric data. For example, a record may include a first name, last name, address, and other contact information. Each item within the record, such as first name, last name, or address, is recognized as a field. A record can contain one or more fields.
You can create a data source file or import an existing one. You can create a data text file by using CorelDRAW or a text editor. You can edit the data in a data source file at any time.
Creating a form document
Creating form documents is similar to creating regular drawings. For form documents, however, you insert merge fields, which are replaced by information from the data source during the merge.
Associating a form document with a data source file
When you use CorelDRAW to create a data file, or when you import an existing data file into CorelDRAW, the data file is associated with the form document. The association is always stored with the document and cannot be changed.
Performing a merge
CorelDRAW provides different output options for merge documents. You can print a merge document or save it to a new document. When you print a merge document, the form document is merged with the data source file during printing. When you save the merged document to a new file, the application merges the form document with the data from the data source file in a new CorelDRAW file. You can use this file to preview your final output and make minor adjustments before printing. For major changes, such as the addition or repositioning of merge fields or the addition of new records, you must work in the form document.
To create a data source file by using CorelDRAW |
•
|
To create a numeric field, type a field name in the Numeric field box, click Add, and then click Next.
|
•
|
|
You can edit the fields and records in an existing data source file by clicking File Print merge Edit merge fields and following the instructions in the Print merge wizard.
|
To create a data source by using a text editor |
2.
|
|
On the first line, type the number of merge fields that you want to insert in the drawing. For example:
|
3.
|
|
On the second line, type the names of the merge fields by separating them with a backslash. Each merge field must begin and end with a backslash. For example:
|
4.
|
|
On the next lines, type the data that you want to appear in the merged document. Each line constitutes a record. For example:
|
•
|
|
Backslashes function as markers to indicate the beginning and end of merge fields; therefore, you cannot use them as data in fields.
|
•
|
|
Data in fields must end with a character. Blank spaces or lines before backslashes prevent the merge from completing successfully.
|
To import a data source file |
2.
|
|
In the Print merge wizard, enable the Import text from a file or an ODBC data source option, and click Next.
|
3.
|
|
Enable the File option, navigate to the drive and folder where the data file is stored, choose a file, and click Next.
|
To import an ODBC data source file |
2.
|
|
In the Print merge wizard, enable the Import text from a file or an ODBC data source option, and click Next.
|
To create a form document |
3.
|
|
Follow the instructions of the Print merge wizard to associate the drawing with a data source file, and then exit the Print merge wizard.
|
CorelDRAW places the merge field in the center of the current view. If you want to reposition the merge field, drag it to a new location on the drawing page.
|
To perform a merge and print the document |
To perform a merge and save the document to a new file |
•
|
|
You can also perform a merge and save the document to a new file by clicking Merge to new document on the Print merge toolbar.
|