Mailmerge via VB

G

Guest

I am experience problems and solution from Microsoft is not favorable. Before
my department was upgrade with new workstations, we were using Access and
Word 2002. One of our Access databases would open Word mailmerge documents,
create the new letters, and then store them on the file server. This was all
done in Visual Basic using Access.

Now, with 2003 the same code is not working. I looked in the help file for
mailmerge in VB and the commands and syntax are the same. However, a message
will appear in the background (where the user can not see) asking them to
select the correct Access table. Well, this is unacceptable because the user
wouldn′t know which type of letter is being created so wouldn′t know which
table to choose. So, my work around is to just setup the mailmerge in the
Word document and have the VB script in Access just open it. Well, this
doesn′t work either because the mailmerge info is removed when the Word
document opens. What happens is when you open the mailmerge in Word it
prompts the users saying ″do you want to execute the SQL command....″. If you
click ″yes″ the doc will open with the mailmerge info. If you say ″no″ then
the document will open with the mailmerge info removed. HOWEVER, using VB the
prompt is never shown to the user and the default is ″no″ so the mailmerge
info will always be removed.

When I researched this on Microsoft website, I come across this knowledge
base article http://support.microsoft.com/kb/825765/en-us. It states that
registry settings have to be modified in order for my VB program to execute
but this can put computers at security risk.

Is there a better solution? I am very unhappy about this change from
Microsoft.
 
G

Guest

I've done quite a lot of mailmerge from Access ver 2 until present. What I
do, is send the data to file via using a macro with Transfertext, choosing
"mailmerge" as the option. You can convert the macro to vba and put it in a
module within access.


Then within the word document, using mail merge, I think the select is "get
data" or something like that, I link it to the data file I just sent it to. I
usually prefer a .txt extension. And, if the word doc is open, you cannot
successfully transfer new data to it. the doc must be closed.

Within word, I usually record a macro that does the mail merge so it's
easier for the user, to just go to "Tools/macros/" then select the
user-friendly macro name and press run.

Hope this helps
 

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