Access.2007.VBA.Bibl..

(John Hannent) #1
The Word (RTF) and Word Mail Merge features in Access 2007 work much the same as in earlier
Office versions. If you select an Access table, query, or other object, and then select the Word (RTF)
option, all the data from the entire selected object is automatically exported to a new Word docu-
ment, with no option for selecting records.

The RTF document created from a table, query, or form is a Word table, which is a good match for
data in an Access table or select query, but a very poor match for a form. Reports are created as text
documents, not tables (even if they are tabular reports), with footers as text in the body of the doc-
ument, and without most of their formatting; such a document is barely usable. (This is unchanged
for many Office versions now.)

The RTF export option may be useful for creating a quick-and-dirty Word document you can send
to someone who doesn’t have Access, but it is not useful for creating letters or other formatted
Word documents. Figure 6.2 shows an Access table to be exported, and Figure 6.3 shows the
Export dialog, with two options enabled and one disabled (because the object being exported is a
table, there is no formatting to export).

Figure 6.4 shows the Word table created by the RTF export. It has basically the same appearance
as the Access table, but it lacks the alternate-row shading, even though Word 2007 supports this
feature.

FIGURE 6.2
An Access table to be exported to Word.

Part II Writing VBA Code to Exchange Data between Office Components

Free download pdf