MailMerge Macro

AnnPhil

Registered User.
Local time
Today, 17:21
Joined
Dec 18, 2001
Messages
246
I am trying to create a macro that will open up a mail merge letter from word that is tied to a table in access. I have done this before in previous versions of access but not in 2003. I am having a problem with the macro. It runs and doesn't return any error messages but it will not open the mail merge letter in word. It doesn't open Word either. After running the macro i manually open Word and the letter, the merge was completed correctly. I just need the macro to open the letter from within Access.

In the macro i am using the RunApp Action with the command line of
C:\Program Files\Microsoft Office\OFFICE11\winword.exe " D:\FolderName\SubFolderName\LETTER.DOC"

This use to work fine in previous versions of access. Does anyone have any suggestions?

Thank you in advance for any help
 
I haven't upgraded yet, so I can only have a guess. Or would it be something to do with security? Would you need permission to Open this file or that file?
 
One surefire way to determine if this is a 2003 issue is to take your old macro (and old database and word document if needed) and conver to 2003. If it works, you definitely know it's something wrong with the macro. You can then try and adapt the macro to present table/document in old version. convert it to 2003.

If it didn't, then you know that it's a 2003 issue and you can research on what may have changed between the version and fix that.
 
Well i have to say that after leaving the db alone for a few hours really helped. I figured out that the only thing wrong was a stupid space in the command line! I had a space before the Letter D which represented the drive that the file is located. As soon as i took out the space it worked that a charm:)

For anyone wanting to know the correct systax here it is:

C:\Program Files\Microsoft Office\OFFICE11\winword.exe "D:\FolderName\SubFolderName\LETTER.DOC"
 
I think this is exactly what I am looking for, but want to make sure. I work for an insurance TPA and am working on a database where an entry will be made when someone needs a new card printed. After entering 20 people for example with 4 different plans, we want to run a macro to print the personalized documents for each person. Based on their plan, we want to print the appropriate document from Excel that merges back to this database and pulls their name and plan information from the table. Is that basically what this command does? If so, you are saving my bacon! :)
 
Miller,
Personally, I wouldn't run a macro in your instance. Do you have four different insurance cards for the four different plans? If so, I would have your customer info table, the create a form which runs a query based on the customers info you want it to pull. TBH I'm not sure if excel has a mailmerge (dont think it does) so maybe have four different word templates with the tables. when you want to export your customers data it will run the query, open word, connect to the query, then use mailmerge to auto fill in all the data and print
 

Users who are viewing this thread

Back
Top Bottom