Super Easy Word Merge.
Finally, some code to stop the crazy solutions to merging a single record in ms-access to a word document. Like everyone else, I asked why does this have to be so hard?
I also have a very high dislike of bookmarks, since end users can not possibly be expected to work with them when trying to create a template. My above approach is so slick, that your END USERS in most cases can figure this out WITH NO training.
In addition, this code is late binding, so it works even if your version of ms-word is different then that of ms-access.
How to use:
Simply merge the 2 forms and 2 modules of code into your application. Then place a button on you ms-access form with the following ONE LINE code.
MergeSingleWord
That is it!! You are done!. Now, just hit the "add new template" button to create a word template". Now insert your merge fields, and SAVE the document. Next, just try hitting the word merge button again. This is way cool, and easy. I will write up some better instructions, but I have included a sample form for you to try.
Note that if you do import the code into your a2000 application, then you MUST set the
"Microsoft DAO 3.6 Object Library" in the references window.
Access97 : click here for access 97 merge code
Access2000: click here for access 2000 merge code
Update: Feb 14, 2004. I have modified the above merge example to work with office 2003. I your version is before Feb 14, 2004, then you want to re-load the above software
For some screen shots and some more notes on using this merge code please click here Merge notes.