ACC: Using Data from MS Access in a WordPerfect Mail Merge
ID: Q104916
|
The information in this article applies to:
-
Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97
-
WordPerfect for DOS, versions 5.1, 6.0
-
WordPerfect for Windows, versions 5.1, 5.2
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills.
The following information describes how to prepare data in a Microsoft
Access database to use in a mail merge in WordPerfect for DOS or
WordPerfect for Windows.
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 in a format that WordPerfect recognizes as a valid
mail merge data file (also called a "secondary file"). WordPerfect can
use Delimited Text or dBASE data files as secondary files in a mail merge.
The following information discusses how to export data from Microsoft
Access for use in a WordPerfect mail merge.
Exporting Data from Microsoft Access for Use in WordPerfect
In Microsoft Access 7.0 and 97:
- Start Microsoft Access and open the sample database Northwind.mdb.
- Select the Customers table in the Database window.
- On the File menu, click Save As/Export.
- In the Save As Dialog box, click To an External File or Database.
- In the Save Table 'Customers' In... dialog box, select Text Files,
dBASE III, or dBASE IV in the Save as type box.
- Click the Export button.
- If you are exporting to a text file, the Export Text Wizard (or Text
Export Wizard in version 7.0) appears. Click the Advanced button and
set the following options:
Field Delimiter: {tab}
Text Qualifier: {none}
Click OK, and then click Finish to export the data.
TIP: If you export data regularly to WordPerfect, you can click the
Save As button in the Export Specification dialog box to save the
Export options. That way you can avoid having to specify these options
each time you export data.
In Microsoft Access 1.x and 2.0:
- Start Microsoft Access and open the sample database NWIND.MDB.
- On the File menu, click Export.
- In the Export dialog box, select Text (Delimited), dBASE III, or
dBASE IV, and then click OK.
- Select the Customers table, and then click OK.
- In the Export to File dialog box, choose a directory and a file name
for the exported data, and then click OK.
- If you are exporting a delimited text file, the Export Text Options
dialog box appears. Click the Options button and set the following
options:
Text Delimiter: {none}
Field Separator: {tab}
Click OK to export the data.
TIP: If you export data regularly to WordPerfect, you can click the
Save As button to save the Export Text Options. That way you can avoid
having to specify these options each time you export data.
Performing 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}
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 looks like 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 the
Northwind.mdb (or NWIND.MDB) database are in the following order:
- CustomerID (or Customer ID in versions 1.x and 2.0)
- CompanyName (or Company Name in versions 1.x and 2.0)
- ContactName (or Contact Name in versions 1.x and 2.0)
- ContactTitle (or Contact Title in versions 1.x and 2.0)
- Address
- City
- Region
- PostalCode (or Postal Code in versions 1.x and 2.0)
- Country
- Phone
- Fax
When you create the primary file in WordPerfect, you can always refer
to the field numbers in the same order as they appear in your Microsoft
Access table or query.
REFERENCES
For more information about exporting data in Microsoft Access, search
the Help Index for "exporting data."
Additional query words:
wp51 wpwin print merge
Keywords : kbinterop
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: March 26, 1999