Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Yreka, California, USA
    Posts
    192
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Word 2010 MailMerge Records into Table--Table to Adjust to Number of Records

    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,
    Attached Files Attached Files
    Thanks much, Judy Crawford

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    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/sho...merge-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-m...html#post23345
    http://www.msofficeforums.com/mail-m...html#post30327
    http://windowssecrets.com/forums/sho...l=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-m...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
    [MS MVP - Word]

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Yreka, California, USA
    Posts
    192
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.
    Thanks much, Judy Crawford

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    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.
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Yreka, California, USA
    Posts
    192
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by jcrawfor View Post
    That is exactly what we needed. What can I do for you!?
    Enjoy it!
    Quote Originally Posted by jcrawfor View Post
    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.
    Quote Originally Posted by jcrawfor View Post
    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
    [MS MVP - Word]

  7. The Following User Says Thank You to macropod For This Useful Post:

    jcrawfor (2016-03-11)

  8. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Yreka, California, USA
    Posts
    192
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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!
    Thanks much, Judy Crawford

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •