Access.2007.VBA.Bibl..

(John Hannent) #1

D


espite the new and improved report interactive features discussed
in the “Report Layout View” sidebar, for full control over the
appearance and content of documents filled with Access data, VBA
Automation code working with Word documents is the best choice. This
chapter discusses producing Word documents by using a Ribbon command
to create simple documents, or writing VBA Automation code to create Word
documents and fill them with data, using four different methods.

In contrast to Access reports (even in the new Layout view), Word docu-
ments have extensive formatting options, including tables, form fields, and
other specialized controls not available in Access reports, even in Layout
view. Generating Word documents from Access VBA code lets you use all of
Word’s formatting options and (if desired) to create a separate document for
each Access record, instead of a multi-page mail merge document. And the
Word documents containing merged Access data can be edited, which is not
an option even for Access 2007 reports.

IN THIS CHAPTER


Office 2007 built-in Word export

Components of the Word object
model used in Automation code

Creating Word documents filled
with Access data, using four
different methods

Working with Word


Documents and Templates

Free download pdf