Example Office Automation

Using automation to control other Office Applicaitons from Access
Display:
Sort By:

By Candace Tripp (utter:angel) Access 2000 format

 

Sends e-mail to multiple recipients using the CDO object (cdonts.dll)and stores the addresses in the database.

By Candace Tripp (utter:angel) Access 2000 format

 

Sends e-mail to multiple recipients using the Outlook object and stores both the message and the addresses in the database.

Author: Albert D. Kallal

 

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.