Microsoft KB Archive/118871

= ACC2: How to Start the Mail Merge Wizard Without the Toolbar =

Article ID: 118871

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q118871



SUMMARY
Advanced: Requires expert coding, interoperability, and multiuser skills.

This article describes how to start the Mail Merge Wizard without using the Merge It button on the toolbar.



MORE INFORMATION
The Mail Merge Wizard helps you merge data from a Microsoft Access table or query with a form letter or other document in Microsoft Word. You can start the Mail Merge Wizard by clicking the Merge It button on the toolbar.

To start the Mail Merge Wizard without using the Merge It button, call the PM_Entry function from within your application. Make sure to supply the function with a valid table or query name as an argument. For example, to merge the data in the Customers table with a Microsoft Word document by clicking a command button on a form, you would specify the following setting for the command button's OnClick property:

  =PM_Entry("Customers")

NOTE: In Access 2.0, WZLIB.MDA must be loaded in the [Libraries] section of your MSACC20.INI file for this function to be available. If WZLIB.MDA is not loaded as a library, you cannot run the PM_Entry function.

To set this reference in Microsoft Access 95, go to any Access Basic module, click References from the Tools menu, and make sure wzmain70 is clicked.

To set this reference in Microsoft Access 97, go to any Access VBA module, click References from the Tools menu, and make sure wzmain80 is clicked.

