'Merge with MS Word' button

Mr Clevver

Idiot Savant
Local time
Today, 21:04
Joined
Jun 26, 2008
Messages
17
Hi all,

I have a system, which stores customer address/contact information, which I would like to use to bulk email customers. The only issue I'm having at the moment, is that in order to export the information to word for merging I have to right click on the table and select:
Export > Merge it with Microsoft Office Word

There is nothing wrong with having to do this, per se, but I'd rather avoid exposing users other than myself to the tables in this manner (by default the datebase opens with just the main menu form).
So, to get around this, I was hoping to use code, or a macro, to start the Merge it with MS Office Word wizard, but can't for the life of me find a way to do that. Is this possible, or am I going to have to rethink?

I'm using Access 2007

Thanks.
 
See:

Super Easy Word Merge

Don't let word attached to you running mdb file.

Again, this is just common sense. A large portion of word merge examples actually let word OPEN your mdb file. This is a formula for disaster. Allowing word to open the mdb file means that you have to deal with some known bugs (like word launching a second copy of ms-access for example). Further, if you implement security in ms-access, now word has to deal with passwords and permissions (again, a huge can of worms). Worse is if you have the runtime of ms-access installed, or multiple versions of ms-access, then word can again cause all kinds of problems as it tries to launch ms-access, and it might even launch the wrong version of ms-access. I could again rant on for pages here, but I think any developer can clearly see that if we prevent word from trying to attach to the ms-access mdb file, then we avoid a TON OF POSSIBLE problems. Again, since we CAN control this, then lets do so. As a result, my sample merge code DOES NOT let word attached to the mdb file. As a result, it is rock solid. As a result, it just works!

Of course what I do is create a temp txt file with the one record merged as a text csv file. Note that I used to use a file name of merge.txt. However, it turns out that a bug exists in the word97 merge on pc's with file extensions HIDDEN. The problem is especially noticeable on win xp machines, since hidden extensions is a common default for many users pc's. So, the solution here is to either turn on extensions, but that is hard to do. It is way too much to ask users to re-configure their pc's to show file extensions. However, by using a file name with a non registered file extension, this known word merge bug can be avoided! Thus, I now use a file name of merge.888, and this avoids this bug. If you need to use those merge files in Excel, you can either change my code, as the file name used is a constant. You can also just re-name the temp file also.
By Albert D. Kallal, Access MVP.

I find the abouve to be also true for Office 2007.
 
I love the solution of Super easy word -

draw back - you may lose number formatting - you then have to use switches in word to get the formating back ...

other than this is fab..
 
Albert,

I downloaded your Super Easy Word Merge modules and printed them out in hopes of learning more about the mail merge process, but I have a few questions for you. I am working on a process where there could be incidents which occur. Unfortunately I have to deal with report documents which are controlled away from me so I cannot create Access Reports for them. I have build a form for the database which allows for the input of the various fields which are required to issue the Incident Report.

With your code, I will need to make some decisions to identify which of three possible reports need to be filed and any combination of the three could be required and then transfer the data when it is added to the database. Is the mail merge program you created the best means to do this data push? I will have to work out the specifics for adapting your to do what I need, but I am curious if it is the correct place to start.
 
Whooo ..

THe super easy word allows any field on the form to be used in a merge - and the user can build their own reports - by the use of templates


the only thing the user needs to have a bit of know on is switches in word for number formatting

what you need to do is import the modules and the two (?) forms into your d/base and it should work straight away

(before to start make a copy of your db - as occasionally the import cause the system to crash - )
plenty of get rounds - but try the straight import first if it screw your system start again but this time after you have imported the forms/modules - open the d/b in code then compact from code - this seems to resolve the issue
 

Users who are viewing this thread

Back
Top Bottom