|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Repeating Section (Need Multiple values from different excel rows into one document)
Instructions for Mail Merge field codes are not too clear and I have been stuck at this for days and have gotten nowhere. Here's what I am trying to do:
With the Excel file I am using for this Mail Merge, there are multiple values on different rows, that I'd like to appear on one page. The key field here is the 'No.' and every row will have this field, along with the 'description' on it. You can see the description field on the word document. What I would like to happen is for the document to keep looping through each row, inserting all of the descriptions on the same page, as long as the 'No.' is the same. The pseudo code would be: IF No. is the same, loop through, else, start a new page. I tried using this video to help me, but I can't quite implement it: https://www.youtube.com/watch?v=4Ck8KAwAQso I am new to this and I've tried to code this myself, but have gotten nowhere. Documents are attached. If anyone could help me with this, I would greatly appreciate it. Thanks |
#2
|
||||
|
||||
This is exactly the type of work that http://www.gmayor.com/ManyToOne.htm was developed for. If you like this, look out for a major update to the e-mail capability (currently under test by selected users), hopefully later this week.
Because rows are added as required you will need to insert a very narrow row after the title row to avoid replicating the title row border: when merged gives for id #1
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Quote:
Sorry to be a pain, but are you able to post a list of instructions on how to do this quickly? I've already installed the add-on. I know there are some on that website, but I'm multi-tasking at the moment (which I suck at) and I don't have time to completely go through that page. If you could, I'd be very grateful. Thanks |
#4
|
||||
|
||||
Quote:
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 Another option would be to use a DATABASE field in a normal letter mailmerge main document and a macro to drive the process. An example of this approach can be found at: http://answers.microsoft.com/en-us/o...1-1996c14dca5d 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 (Graham's already provided a link to this); or Doug Robbins at http://bit.ly/1hduSCB In addition to a 'Many to One' merge, the latter handles: Merge with Charts Duplex Merge Merge with FormFields Merge with Attachments Merge to Individual Documents Merge, Print and Staple Whichever course you decide upon, you're going to have to do your own reading.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
multiple rows, one-to-many, same document |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
InfoPath 2013 In a Repeating Section condition a field of a nested repeating section | kirvin08 | Misc | 0 | 03-15-2016 04:52 AM |
Hide rows in multiple columns based on zero values | Deane | Excel Programming | 19 | 06-23-2015 11:24 PM |
Insert values from multiple rows based on value in one column | pachmarhi | Excel | 3 | 07-18-2014 09:57 PM |
Repeating a form section in the same word 2010 document | RaeC_ham | Word | 1 | 08-22-2013 07:02 PM |
Margins in multiple section document | oaty | Word | 0 | 08-15-2010 07:32 AM |