Microsoft KB Archive/209212

= ACC2000: How to Use Data from Microsoft Access in a WordPerfect Mail Merge =

Article ID: 209212

Article Last Modified on 7/14/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q209212



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SUMMARY
This article shows you how to prepare data in a Microsoft Access database so that you can use it in a mail merge in WordPerfect for Windows or WordPerfect for DOS.



MORE INFORMATION
WordPerfect for Windows and WordPerfect for DOS cannot read data from Microsoft Access in its native format. To use data from a Microsoft Access database in a WordPerfect mail merge, you must export the data from Microsoft Access into a format that WordPerfect can recognize as a valid mail merge data file. A mail merge data file is often called a "secondary file." WordPerfect can use the following files as secondary files in a mail merge:
 * Delimited text files
 * dBASE data files

How to Export Data from Microsoft Access for Use in WordPerfect
 Start Microsoft Access and open the sample database Northwind.mdb. In the Database window, click the Customers table. On the File menu, click Export. In the Export Table 'Customers' To dialog box, in the Save in list, select the folder where you want to save the secondary file. In the Save as type list, click Text Files (*.txt;*.csv;*.tab;*.asc) (or click dBASE 5, dBASE IV, or dBASE III), and then click Save.  If you are exporting to a text file, the Export Text Wizard appears. Click Advanced, and then set the following options: <pre class="fixed_text">  Field Delimiter: {tab} Text Qualifier: {none} </li> If you export data regularly to WordPerfect, click Save As. Then you do not have to specify these options each time that you export data. Otherwise, click OK, and click Finish to export the data.</li></ol>

How to Perform a WordPerfect Mail Merge with Microsoft Access Data
A WordPerfect mail merge is the process of combining information from two documents: a "primary file" (or form file) and a "secondary file" (or data file) to create a single merged document.

The primary file, which is typically a form letter, is used to direct the merging process. The secondary file contains records of information, typically names and addresses, that WordPerfect uses to complete the primary file. The primary file contains placeholders (fields) that indicate where specific information from the secondary file, such as a first name or an address, should appear.

The placeholders appear in the primary file starting with {FIELD}, which is followed by a number, indicating which field in the secondary file to use. The placeholder ends with a tilde character (~). For example, {FIELD}2~ indicates the placeholder for the second field in the secondary data file. In the Customer file exported earlier, this is the Company Name field.

NOTE: In WordPerfect version 6.0 for DOS the field format is as follows: FIELD(2).

The fields appear in the secondary file in the same order as they appear in Microsoft Access. The fields in the Customers table in Northwind.mdb are in the following order:
 * 1) CustomerID
 * 2) CompanyName
 * 3) ContactName
 * 4) ContactTitle
 * 5) Address
 * 6) City
 * 7) Region
 * 8) PostalCode
 * 9) Country
 * 10) Phone
 * 11) Fax

When you create the primary file in WordPerfect, you refer to the field numbers in the same order as they appear in your Microsoft Access table or query.

<div class="references_section">