Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2015, 08:40 AM
blar blar is offline Mail merge at large table with variable number of rows Windows 7 32bit Mail merge at large table with variable number of rows Office 2010 32bit
Novice
Mail merge at large table with variable number of rows
 
Join Date: Oct 2015
Posts: 1
blar is on a distinguished road
Default Mail merge at large table with variable number of rows

I have converted a dataset that is based on the the job required (and allocating a person to that) into one that will sent agreements to the individual that are grouped per person. This can be between 1 and 20 rows. The conversion also adds some detail not in the orignal data because some jobs are actually more than one job.

Attached is an image of the table I need to populate in the agreement. I have two main problems (and probably several smaller problems!):

1. To do this I have to create a table with 20 rows, each field is different as you can seen on the table, so far I haven't found a way of populating the whole table without going into each cell and adding the merge field (I'd need to do this 120 times!). Is there a way of automatically populating the full table?


2. The table has 20 rows, where the number of jobs is less than that the remaining rows are blank which is messy. Is there a way in the mail merge of only using the rows you need, or could I do it in one cell but insert lines to make it more readable.

I'm well aware that this needs to be properly automated but it has been dropped on me at the last minute and has to go in the next couple of days so any short term fixes you can offer would be greatly appreciated.
Attached Images
File Type: png MailMergeTable.PNG (23.4 KB, 59 views)

Last edited by blar; 10-19-2015 at 08:44 AM. Reason: reformat table
Reply With Quote
  #2  
Old 10-19-2015, 03:04 PM
macropod's Avatar
macropod macropod is offline Mail merge at large table with variable number of rows Windows 7 64bit Mail merge at large table with variable number of rows 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

If your data actually have separate columns for each component's code, level, scope, title, test type & fee, then yes, you'll need to insert them all individually. And, if you require them all in an actual single table, rather than simply having a tabular layout, you will inevitably end up with a table with empty rows if data are missing. There are ways around this, but that requires having perhaps 20 (or more) different versions of your table.

If, however, you only have one set of columns for every component's code, level, scope, title, test type & fee, with multiple rows per person, your current approach cannot be made to work; instead, 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 at:
http://windowssecrets.com/forums/sho...merge-Tutorial
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.

The field coding for this is 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
http://windowssecrets.com/forums/sho...l=1#post928391

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
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge at large table with variable number of rows Mail Merge to create specific number of table rows flackend Mail Merge 4 12-01-2023 02:49 PM
Mail merge at large table with variable number of rows Mail merge into table with two colums and several rows kathriiin Mail Merge 3 03-30-2015 07:06 AM
Creating a table for a variable number of rows OllieOnline Mail Merge 1 03-27-2013 02:48 PM
Using macro to add variable number of rows to a protected word table Julia Word Tables 1 01-09-2013 06:04 AM
Mail merge at large table with variable number of rows Fixing number or rows in a table burnsie Word 2 07-12-2011 02:59 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:37 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