macros and merging

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top