Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2018, 06:07 AM
ajohnson ajohnson is offline Mail Merge variable table length Windows 10 Mail Merge variable table length Office 2016
Novice
Mail Merge variable table length
 
Join Date: Jun 2018
Posts: 2
ajohnson is on a distinguished road
Arrow Mail Merge variable table length

I am doing a mail merge from an excel sheet into a table in word. My problem is that the excel file is downloaded from another system and sometimes the excel file contains say 10 records and thus needs 10 rows and other times it may be more than a hundred. I need the table to 'fit' the number of records so that I don't have to create a table with hundreds of rows when only 10 will be used. Is there any way I can do this within word?


Aaron
Reply With Quote
  #2  
Old 06-27-2018, 11:36 AM
Charles Kenyon Charles Kenyon is offline Mail Merge variable table length Windows 10 Mail Merge variable table length Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,082
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

This sounds like you would want a directory merge rather than a letter merge.
Mail Merge
Reply With Quote
  #3  
Old 06-27-2018, 04:07 PM
macropod's Avatar
macropod macropod is offline Mail Merge variable table length Windows 7 64bit Mail Merge variable table length Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can use Word's Catalogue/Directory Mailmerge facility for this (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 in the corresponding 'Sticky' thread at the top of this forum:
https://www.msofficeforums.com/mail-...-tutorial.html
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.

Depending on what you're trying to achieve, the field coding for this can be complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
https://www.msofficeforums.com/mail-...html#post23345
https://www.msofficeforums.com/mail-...html#post30327

Another option would be to use a DATABASE field in a normal ‘letter’ mailmerge main document and a macro to drive the process. An outline of this approach can be found at: http://answers.microsoft.com/en-us/o...1-1996c14dca5d
Conversely, if you're using a relational database or, Excel workbook with a separate table with just a single instance of each of the grouping criteria, a DATABASE field in a normal ‘letter’ mailmerge main document could be used without the need for a macro.
For a working example, see:
https://www.msofficeforums.com/mail-...-multiple.html

The DATABASE field can even be used without recourse to a mailmerge. An example of such usage can be found at: https://www.msofficeforums.com/mail-...html#post67097

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 http://bit.ly/1hduSCB
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 06-28-2018, 06:39 AM
ajohnson ajohnson is offline Mail Merge variable table length Windows 10 Mail Merge variable table length Office 2016
Novice
Mail Merge variable table length
 
Join Date: Jun 2018
Posts: 2
ajohnson is on a distinguished road
Default

Thanks so much!
Reply With Quote
Reply

Tags
dont print blank lines

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge variable table length Mail merge with variable content from Excel jaggu Mail Merge 5 05-09-2017 02:00 PM
Mail Merge variable table length Mail Merge using variable data in Excel dewestone Mail Merge 1 12-20-2016 01:09 PM
Mail Merge variable table length Mail Merge with variable table length MS Word 2013 rbr Mail Merge 6 11-18-2016 07:05 AM
Mail Merge variable table length Mail merge at large table with variable number of rows blar Mail Merge 1 10-19-2015 03:04 PM
Mail Merge variable table length Import from variable length text diouna Excel 3 07-10-2012 09:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft