Working with form documents for a merge
A form document provides the pattern and layout for a merged document. It can contain text, formatting, graphics, and merge commands. You create form documents the same way you create regular documents; however, you insert merge commands which are replaced by information from a data source during the merge. For more information about inserting merge commands, see “Using merge commands.”
This is an example of a form document containing 1) FIELD codes where the name and address of the recipient are inserted and 2) text for a letter.
At the top of the document window, WordPerfect inserts the Merge toolbar to give you greater control over a merge. For more information about the Merge toolbar, see “Using the Merge toolbar.”
WordPerfect lets you create a form document that you can personalize during a keyboard merge. A keyboard merge lets you enter information into the form document each time you need to send it. For more information about the KEYBOARD command, see “Reference: List of merge programming commands.” You also can create a form document for labels.
If you do not want to create a new series of merged documents, you can send all of the merged data to a table. After you perform the merge, all of the merged output will be formatted into a single table with each column representing a field.
To create a form document for a merge or keyboard merge |
1.
|
|
Click Tools Merge.
|
2.
|
|
In the Merge dialog box, click Form document Create form document.
|
If there is text in the active document, enable one of the following options in the Data file source dialog box, and click OK:
|
•
|
Use file in active window — uses the active document
|
•
|
New document window — creates a new document
|
3.
|
|
In the Associate form and data dialog box, enable one of the following:
|
•
|
Associate a data file — specifies the path and filename for the file
|
•
|
Associate an address book — specifies an address book
|
•
|
Associate an ODBC data source — lets you select the ODBC source to use
|
•
|
No association — does not associate any data file
|
4.
|
|
Click OK.
|
5.
|
|
Perform an action from the following table.
|
•
|
|
For information about inserting merge commands, see “To insert a merge command.”
|
To insert a field in a form document for a merge |
1.
|
|
On the Merge toolbar, click Insert Field.
|
2.
|
|
Click in the form document where you want data to be filled in from a data source.
|
3.
|
|
In the Insert field name and number dialog box, choose a field from the Field names list.
|
You can keep the Insert field name and number dialog box open and continue to add information and formatting to the form document.
|
4.
|
|
Click Insert.
|
To create a form document for labels |
1.
|
|
Click Tools Merge.
|
2.
|
|
In the Merge dialog box, click Form document Create form document.
|
If you have typed in the current document, enable one of the following options in the Data file source dialog box:
|
•
|
Use file in active window — uses the active document
|
•
|
New document window — creates a new document
|
3.
|
|
In the Associate form and data dialog box, enable the Associate an address book option, and choose an address book from the list box.
|
4.
|
|
Click OK.
|
5.
|
|
On the WordPerfect menu bar, click Format Labels.
|
6.
|
|
In the List labels for area, enable one of the following label options:
|
•
|
Laser printed — displays laser label options
|
•
|
Tractor-fed — displays tractor-fed label options
|
•
|
Both — displays laser and tractor-fed label options
|
7.
|
|
Choose a label style from the Labels list, and click Select.
|
8.
|
|
Insert fields in the form document.
|
•
|
|
You can merge selected records from an address book. For information, see “To merge selected records from an address bo
ok.” |
To create a table for a merge |
1.
|
|
Click Tools Merge.
|
2.
|
|
In the Merge dialog box, click Form document Create form document.
|
If there is text in the active document, enable one of the following options in the Data file source dialog box:
|
•
|
Use file in active window — uses the active document
|
•
|
New document window — creates a new document
|
3.
|
|
In the Associate form and data dialog box, enable one of the following options and click OK:
|
•
|
Associate a data file — specifies the path and filename for the associated data file
|
•
|
Associate an address book — specifies an address book
|
•
|
Associate an ODBC data source — lets you select an ODBC source
|
•
|
No association — does not associate any data file
|
4.
|
|
On the WordPerfect menu bar, click Table Create and in the Create table dialog box, type the specified values in the following boxes:
|
•
|
Columns — number of columns
|
•
|
Rows — 2
|
5.
|
|
Click Create, and type a heading in each cell of the first row.
|
6.
|
|
Right-click the table, click Format, and on the Table tab, enable the Insert new rows automatically check box, and click OK.
|
7.
|
|
Insert fields in the second row of the table, and click Close.
|
8.
|
|
Click at the end of the last cell in the second row, and on the Merge toolbar, click Insert merge code and choose More.
|
9.
|
|
In the Insert merge codes dialog box, choose REPEATROW from the Merge codes list, click Insert, and click Close.
|
•
|
|
After merging, the table expands one row for each record in the associated data file.
|
•
|
|
Press Tab to move to the next cell.
|