• Word 2010 MailMerge Records into Table–Table to Adjust to Number of Records

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Word 2010 MailMerge Records into Table–Table to Adjust to Number of Records

    Author
    Topic
    #504819

    I’ve read through many of the MailMerge threads here, but don’t see one quite like what I need to do. I’m converting a bunch of WordPerfect MailMerge documents for our Personnel Department. One document contains a table of application along with addition non-merge cells. We need to have the last and first names fields in one cell and the next cell needs the City State and Zip fields. In WordPerfect there is a REPEAT ROW command that allows the table to extend with a row for each candidate. It can vary from three or four to as many as forty or fifty. Is there a similar command in Word MailMerge? I tried Next Record, but that didn’t work.

    I’ve attached the Word Document I created. Theyuse an Access database for each recruitment so every record needs to be included with the selected fields for each record on different rows.

    Thanks in advance for any help you can render,

    Viewing 1 reply thread
    Author
    Replies
    • #1555357

      Word doesn’t have anything equivalent to a REPEAT ROW command. However, you can use Word’s Catalogue/Directory Mailmerge facility for the kind of thing you’re after (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 ‘Sticky’ thread at the top of this forum:
      http://windowssecrets.com/forums/showthread//154370-Microsoft-Word-Catalogue-Directory-Mailmerge-Tutorial
      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:
      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
      http://windowssecrets.com/forums/showthread//157725-Word-2010-Merge-from-excel-into-Table-Directory?p=928391&viewfull=1#post928391

      Another option would be to use a DATABASE field to produce the table without needing to resort to a mailmerge. An example of this approach can be found at: http://www.msofficeforums.com/mail-merge/21847-mail-merge-into-different-coloumns.html#post67097.
      An advantage of using a DATABASE field is that it updates as your data change, without the need to re-run anything.

      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

      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

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #1555410

        Thanks, Paul. I had read your tutorial prior to writing my question and I’ve read it again since getting your reply. I thought I was a pretty advanced user, but am overwhelmed on this one! Just a few more questions and comments.

        I looked at Graham Mayor’s sites as well. I don’t think I want to go that route because I’m preparing these merge docs for other novice Word users to use on a number of different PC’s. I’ll try to use one of your options, so….

        1. All of my records in the data source are for the same position. I’ve not gotten the user department to accept one data source with a “position” field added. However, If I can convince them that is better, I could put the Position field in the Heading so they wouldn’t have to manually insert each time. Any good arguments for maintaining one data source?

        2. Since the page is only for one recruitment there is no break on a “key field” I just need to have a new line for every person. Do I somehow make Last_Name and First_Name the key? Is that a first and second key in your examples? I need the City, State and Zip Code in the same row, and a new row added with the same row formatting for each applicant.

        3. So, once I get the fields to display correctly, I need to add the macro under Merging to Tables, right? I think I’ll need to add to the user’s Normal.dotm template.

        4. How can I be assured that each row will have the same formatting with the same columns as the first row, with the necessary blank columns for the evaluator to place their comments, etc.? Will this macro work no matter how the table rows are formatted?

        I’m sorry to be such a dunce on this one. I just want to get it right because the Personnel Department uses a number of tabled documents during a recruitment, and I’ll be able to create other main documents if I get one working correctly. It was easy in WordPerfect to create a Table List. We are just trying to eliminate the need for WordPerfect.

    • #1555452

      Since you apparently want to merge the details for one position at a time, I’d suggest a different approach:
      1. Select the position to generate the interview screening document for, via the mailmerge filters;
      2. Edit the interview date; then
      3. Click on the ‘run merge’ button on the attached revision to your document.

      Note: You’ll need to re-attach the data source.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #1555537

        That is exactly what we needed. What can I do for you!? Thanks so much for writing the macro. Looks like some visual basic is involved. One question remains for me. If I need to create the same thing or similar for another merge document can I copy the macro and have it work? If not, how would it be changed? Seems like if position is the key then we should be able to use the same macro even if the fields to be merged are different.

        With great gratitude, Judy Crawford

        • #1555557

          That is exactly what we needed. What can I do for you!?

          Enjoy it!

          Thanks so much for writing the macro. Looks like some visual basic is involved.

          Yes, all MS Office macros these days use visual basic. Word had a predecessor, named WordBasic, but you’re not lilely to find many macros using that.

          If I need to create the same thing or similar for another merge document can I copy the macro and have it work?

          The macro, as written, should work with any mailmerge document that has the same kind of structure as the one in my attachment, that is: three tables – the first containing the header content (can be one or more rows), the second containing the content to be repeated for each record (can also be one or more rows), the last containing the table ‘footer’ (again, can be one or more rows).

          Cheers,
          Paul Edstein
          [Fmr MS MVP - Word]

          • #1555612

            I thought it would after looking at the macro. You have saved me SO VERY MUCH time and angst! I have another question, but will start a new thread!

    Viewing 1 reply thread
    Reply To: Word 2010 MailMerge Records into Table–Table to Adjust to Number of Records

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: