Chapter 22: Integrating Access with Other Applications
801
l (^) Activating the instance of Word
l Moving the cursor in Word
l (^) Closing the instance of the Word object without closing Word
This example prints a thank-you letter for an order based on bookmarks in the thank-you letter
template (Thanks.dotx). Figure 22.4 shows the data for customers, Figure 22.5 shows the data
entry form for orders, Figure 22.6 shows the Thanks.dotx template, and Figure 22.7 shows a
completed merge letter.
Note
The example in this section does not use a built-in Word template. None of the Word templates appear to
include bookmarks, and this example’s code depends on carefully placed bookmarks in a template. Also, in the
interest of keeping the example simple, this example uses a much smaller set of contacts and orders than is
used in Collectible Mini Cars. However, the example is easily adapted to work with the Collectible Mini Cars
customers and sales tables.
FIGURE 22.4
Customer data used in the following Automation example is entered on the Customers form.
FIGURE 22.5
Each customer can have an unlimited number of orders. Thank-you letters are printed from the Orders form.