Answered by:
Mail Merge with expandable table

Question
-
I have a data sheet in Excel 2010 that merges to a table in Word. The data sheet has a large number of rows of info, and depending of the document I want the specific type of data merged to specific table cells.
My problem is that I want the table that contains the merged fields to expand its rows corresponding to the number of rows in the data sheet. Earliear I have manually expanded the nr of rows before merging the document.
I might add that my table is configured with a first row that contains titles and that I also have several other tables that are not linked with "merged fields". What I want is One (1) Document with several tables where specific tables are expanding due to my data sheet.
Any input is welcome!
Tuesday, April 9, 2013 11:05 AM
Answers
-
There are several solutions available for a mailmerge with one variable table (and as many non-mailmerge tables as you want), but I'm not aware of any that handle multiple variable-size tables in the same document.
For a mailmerge with only one variable-size table, you can use Word's Catalogue/Directory Mailmerge facility (the terminology depends on the Word version). To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
http://windowssecrets.com/forums/showthread.php/111149-Mailmerge-Tutorial-Create-Sorted-Listings-(2000-2010)
or
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.
For some worked examples, see the attachment to the posts at:
http://www.msofficeforums.com/mail-merge/9180-mail-merge-duplicate-names-but-different-dollar.html#post23345
http://www.msofficeforums.com/mail-merge/11436-access-word-creating-list-multiple-records.html#post30327
Alternatively, you may want to try one of the Many-to-One Mail Merge add-ins, from:
Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or
Doug Robbins at https://skydrive.live.com/?cid=5aedcb43615e886b#!/?cid=5AEDCB43615E886B!cid=5AEDCB43615E886B&id=5AEDCB43615E886B%21566Cheers
Paul Edstein
[MS MVP - Word]- Marked as answer by Max Meng Tuesday, April 23, 2013 9:27 AM
Tuesday, April 9, 2013 12:10 PM
All replies
-
There are several solutions available for a mailmerge with one variable table (and as many non-mailmerge tables as you want), but I'm not aware of any that handle multiple variable-size tables in the same document.
For a mailmerge with only one variable-size table, you can use Word's Catalogue/Directory Mailmerge facility (the terminology depends on the Word version). To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
http://windowssecrets.com/forums/showthread.php/111149-Mailmerge-Tutorial-Create-Sorted-Listings-(2000-2010)
or
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.
For some worked examples, see the attachment to the posts at:
http://www.msofficeforums.com/mail-merge/9180-mail-merge-duplicate-names-but-different-dollar.html#post23345
http://www.msofficeforums.com/mail-merge/11436-access-word-creating-list-multiple-records.html#post30327
Alternatively, you may want to try one of the Many-to-One Mail Merge add-ins, from:
Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or
Doug Robbins at https://skydrive.live.com/?cid=5aedcb43615e886b#!/?cid=5AEDCB43615E886B!cid=5AEDCB43615E886B&id=5AEDCB43615E886B%21566Cheers
Paul Edstein
[MS MVP - Word]- Marked as answer by Max Meng Tuesday, April 23, 2013 9:27 AM
Tuesday, April 9, 2013 12:10 PM -
If you are creating a single output document, have you considered using DATABASE fields to insert the data? Although there are various problems to overcome, e.g. you will almost certainly have to use VBA to apply formatting to the resulting tables, it may be a better approach than MailMerge in this scenario.
Peter Jamieson
Wednesday, April 10, 2013 8:01 AM -
Another approach might be to break the mailmerge main document into a series (one per variable table), do the merge for each document, then use a macro to integrate the portions from each series. The integration should be quite straightforward.
Cheers
Paul Edstein
[MS MVP - Word]Wednesday, April 10, 2013 8:37 AM