Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/104916

From BetaArchive Wiki

Article ID: 104916

Article Last Modified on 1/18/2007



APPLIES TO

  • Microsoft Access 1.0 Standard Edition
  • Microsoft Access 1.1 Standard Edition
  • Microsoft Access 2.0 Standard Edition
  • Microsoft Access 95 Standard Edition
  • Microsoft Access 97 Standard Edition



This article was previously published under Q104916

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

SUMMARY

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:

  1. Start Microsoft Access and open the sample database Northwind.mdb.
  2. Select the Customers table in the Database window.
  3. On the File menu, click Save As/Export.
  4. In the Save As Dialog box, click To an External File or Database.
  5. In the Save Table 'Customers' In... dialog box, select Text Files, dBASE III, or dBASE IV in the Save as type box.
  6. Click the Export button.
  7. 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:

  1. Start Microsoft Access and open the sample database NWIND.MDB.
  2. On the File menu, click Export.
  3. In the Export dialog box, select Text (Delimited), dBASE III, or dBASE IV, and then click OK.
  4. Select the Customers table, and then click OK.
  5. In the Export to File dialog box, choose a directory and a file name for the exported data, and then click OK.
  6. 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:

  1. CustomerID (or Customer ID in versions 1.x and 2.0)
  2. CompanyName (or Company Name in versions 1.x and 2.0)
  3. ContactName (or Contact Name in versions 1.x and 2.0)
  4. ContactTitle (or Contact Title in versions 1.x and 2.0)
  5. Address
  6. City
  7. Region
  8. PostalCode (or Postal Code in versions 1.x and 2.0)
  9. Country
  10. Phone
  11. 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: kbinfo kbinterop KB104916