Note: The Visual Basic code used to produce a report in Microsoft Word or Excel will differ slightly from one version of Microsoft Word or Excel to another. The examples in this documentation were produced using Microsoft Word and Excel 2002.
Note: Please note that the code examples provided here are suggestions only: there are many other ways to code this report.
For these situations,
In this section we demonstrate how to create a mail merge report in Microsoft Word. This report could be developed in Crystal with perhaps greater ease, however, unlike a Crystal report, the mail merge report we will produce in Word can be edited by the user who runs the report.
The following example builds a Microsoft Word mail merge report to generate a Loan Agreement form. The Loan Agreement document consists of three pieces of information from three different sources:
- Loan information: details of the loan itself, e.g. loan period.
- Party information: details of the person to whom the loan is made, e.g. name, address.
- Object information: details of objects being lent, e.g. object summary.