PDA

View Full Version : Run Mail Merge from Macro?



clhare
07-30-2009, 05:13 AM
I have been asked to set up a template that allows the user to select from a list of Word Documents to use as the merge's main document, then allow the user to select a data source from the Excel files in a specific folder.

Since the Word documents are in two folders, I'm thinking I would have to set up a userform and add all the filenames in a listbox (unless there's some other way). So, once I have the listbox setup with the filenames, how do I run the merge from the macro, bringing up a dialog box that shows the files in the spreadsheet folder so the user can select one, then merge the two files?

Any help is greatly appreciated!

Cheryl

macropod
07-30-2009, 06:23 PM
Hi Cheryl,

You could set up your 'index' document as little more than a table with hyperlinks to each of the relevant mailmerge main documents. This would be much simpler than creating userforms, etc.

As for having multiple mailmerge source files, a given mailmerge main document can only work with one source file. So, rather than having to use macros for this, you could get the users to use the 'Mail Merge Helper' toolbar button then follow the prompts from the 'Get Data' button to change the data source. Alternatively, you could have a separate mailmerge main document (hyperlinked to the 'index' document) for each data source.