Word Document from Access

M

Michael Volz

To All on MSDN Discussion Forum:

Is it possible to shell out to a Word document in Access
that has been populated with data from the Access database
in order to generate a professional looking report
document? I have currently used an Access report object
to generate the report document, but the formatting in
Access is very cumbersome, and my boss thought that Word
would be better suited for easier formatting.

Any help or hints on this topic would be greatly
appreciated. Any links to help on this topic would also
be appreciated. Thanks in advance.
 
J

John Nurick

Hi Michael,

It can be done, but it's not simple. You'd need to use Automation and
the Word object model to create and manipulate a Word document via VBA
code and put the data into tables and bookmarks as necessary.

The following Microsoft Knowledgebase articles give the basics:

ACC: Sending the Current Record to Word 97 with Automation (Q131583)
http://support.microsoft.com/?id=131583

Q123859 ACC: Sample OLE Automation for MS Word and MS Excel
http://support.microsoft.com/?id=123859

ACC2000: Using Automation to Create and Manipulate an Excel Workbook
(Q210148) http://support.microsoft.com/?id=210148

There's a white paper and code samples including tutorials available
from Microsoft at
http://support.microsoft.com/?id=253235

Sometimes it's possible to get the desired results by using Word
mailmerge (in particular, the "catalog" feature). In that case you'd use
Automation to start up an instance of Word, create a new document from
the appropriate template, and do the mailmerge.

Almost all of that is Word programming. There's useful information at
http://support.microsoft.com/?id=159328
and
http://support.microsoft.com/?id=170988

And of course there's the Word FAQ at http://www.mvps.org/word and the
Access Web at www.mvps.org/access.


To All on MSDN Discussion Forum:

Is it possible to shell out to a Word document in Access
that has been populated with data from the Access database
in order to generate a professional looking report
document? I have currently used an Access report object
to generate the report document, but the formatting in
Access is very cumbersome, and my boss thought that Word
would be better suited for easier formatting.

Any help or hints on this topic would be greatly
appreciated. Any links to help on this topic would also
be appreciated. Thanks in advance.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top