macros and merging

G

Guest

Hi,
I have a created a table, form and report of data. In the form, I have a
command button named print letters. I am hoping to use macros to take all
the data and merge it into a word document so I can print off the data as
individual leters.

Any thoughts on how I would set up my command macros? Thanks.
 
S

Steve Schapel

Shawna,

No, this can't be done with a macro.

One approach would be to look at this from the Word point of view rather
than the Access point of view. This would involve making a query in
Access, which returns the data you want merged, and then, in Word, set
up your merge document to use that query as its Data Source. Then, you
won't even need your database open to do the letters. Just open the
Word document, and the data will automatically be merged, so all you
need to do is print from Word.

It is possible to use Office Automation in a VBA procedure to control
the Word document from within Access, and write the data into the Word
document by looping through the records in your database. But for a
simple mail merge, this would normally be inefficient and unnecessarily
complicated.

If your requirement is to pump out a copy of the Word merge document,
from within Access, for the currently selected record on your form, then
Albert Kallal has a utility to help with this. See the 'Super Easy Word
Merge' segment on this page:
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
 

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