Microsoft Word's mail merge feature can work directly with data that is stored on the iSeries. You can use this to print a Word document using variable data generated by iSeries programs.
For example: Print a PC-based document that includes logos and graphics combined with data from the iSeries.
Prerequisites:
- An AS/400 ODBC driver, such as IBM Client Access ODBC driver, which comes with Client Access Express or Client Access for Windows 95/NT.
- On the PC, Microsoft Query, an optional part of Microsoft Office.
To create a new Word mail-merge document that links to the iSeries:
- On the iSeries, use the ODBC Administrator and the ODBC driver to create a new data source with the names of the iSeries system and library where the data files reside.
- On the PC, in Word, go to Tools > Mail Merge.
Mail Merge Helper displays.
- Click the Create, Form Letter, and Active Window options.
The mail-merge toolbar is added to the Word document.
- Click the Get Data and Open Data Source options.
Open Data Source displays.
- Click MS Query.
Choose Data Source displays.
- Choose the name of the data source you created in step 1 and click OK.
Note: You may have to enter your iSeries user ID and password.
Add Tables displays.
- Choose the tables that contain the field to include in the mail merge.
Each table you choose is added to the Query pane.
- When you've finished choosing tables, in Add Tables, click Close.
- Drag and drop the fields to include in the mail merge from the Query pane to the Grid pane.
Note: To select all fields, double-click the asterisk (*) at the top of the fields list.
- From the Microsoft Query menu, click File > Return Data to Microsoft Word.
Note: You may have to enter your iSeries user ID and password.
A message box displays that "Word found no merge fields in your main document."
- In the message box, click Edit Main Document.
- In Word, in the mail-merge toolbar, enable Insert Merge Field.
- In the Word document, type any text and insert graphics.
- Place your cursor where you want a merge field and, in Insert Merge Field, choose the field from the list.
The field displays in the document surrounded by double brackets (<< >>).
- After you are finished with the document, on the mail-merge toolbar, click Merge.
Merge dislays.
- In the dialog box, click Merge.
The document displays, containing all the merged iSeries data.
- To print the document, click Print.
Last Modified On:
No, open a new Support Case