Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Nov 2015
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Word 2010 MailMerge - Dynamic tables (of a kind) possible?

    Hi Everyone,

    I'm trying to create a mailmerge doc for work which involves a dynamic table. It's a very basic document and I've got the information where I need it, but I'm having trouble with excess table rows.

    Each participant for our client will have between 1-5 rows on their table (each consisting of 5 columns). I've set it up so that the table is 5x5 as standard but as not every participant will have 5 rows of data, I would like to delete the empty rows (or rather the client has stressed that they do not want empty rows showing!) from each participant in the merge with less than 5 rows.

    Each row that has information will have data in each column, if that matters at all, and the table was created on word with the relevant fields merged to each cell in the table.

    I can't attach my work thus far due to company policy (even asking on here's enough to get me into trouble, despite the fact it's to help my company... ) so if any docs are required, It'll have to wait until I'm home and I'll provide a similar s/sheet and source.

    Hopefully I've been clear enough in my quandary, if not please let me know

    Many Thanks in advance,

    R.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Assuming your data source has multiple records per client, 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 '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

    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
    New Lounger
    Join Date
    Nov 2015
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks for the response. The data source is actually only one row per client to minimise the risk of the wrong details being input on the spread sheet - my company takes an 'assume everyone's an idiot' approach to these type of things. I actually requested that we change it so I could utilise your tutorial but my request was denied. At which point I created this thread

    Thus I've 26 columns for each entry. The first column is a unique code for the client which merges to a different part of the letter, with the next 5 columns being the entries for row 1, the next 5 for row 2, etc. Each client will have 1 + (5n) columns filled (n=1,2,...5)

    The merge fields, as I said, are basic atm. the layout is pretty much (merge fields are relevant to the column no. in the s/sheet):

    <<B>> | <<C>> | <<D>> | <<E>> | <<F>>
    ------------------------------------------------------
    <<G>> | <<H>> | <<I>> | <<J>> | <<K>>
    ------------------------------------------------------
    <<L>> | <<M>> | <<N>> | <<O>> | <<P>>
    ------------------------------------------------------
    <<Q>> | <<R>> | <<S>> | <<T>> | <<U>>
    ------------------------------------------------------
    <<V>> | <<W>> | <<X>> | <<Y>> | <<Z>>

    The more I've searched, the more it seems that with my company's stance on the source s/sheet and the table in the document being mandatory, that what I'm asking isn't possible. I did stumble across a macro which seemed to do the task but that was also dismissed by my company as most people that work here don't know how to utilise macros properly - effectively, the end result needs for the user to have to do nothing other than open the letter and print it off after the source spread sheet has been filled in.

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    An ordinary mailmerge can't generate a dynamic table, but it can generate a dynamic tabular paragraph layout. See attached.

    Alternatively, one could combine the mailmerge with a DATABASE field to produce a dynamic table. The format of such a table is controlled by field switches.
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    New Lounger
    Join Date
    Nov 2015
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks once again Paul. Access is not an option as I'm 1 of only 2 people in our 100+ office that knows how to use it! (This is one of the reasons we don't use it at all tbh).

    I've utilised your example above in a worked example for my manager as a best case example. Hopefully they'll try to push it to our clients despite the lack of a completely bordered table.

    I appreciate all your help. Despite all the obstacles that have pretty much been put in place by my own company it seems that we may have something that works for all parties (I hope...)

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by randomnovice View Post
    Access is not an option
    I can't see what any of what we've discussed has to do with Access. The document in my previous post would work with any mailmerge data source. Another approach, which allows you to retain the table structure, is demonstrated in the attached.
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  7. The Following 2 Users Say Thank You to macropod For This Useful Post:

    Charles Kenyon (2015-11-17),randomnovice (2015-11-20)

  8. #7
    New Lounger
    Join Date
    Nov 2015
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Sorry, my own ignorance showing here; when you mentioned a DATABASE field, I presumed you meant by using Access.

    That last example looks like it's just what I'm after, I'll get on to that tomorrow, thanks

  9. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    A DATABASE field is a Word field that can be used for summarising data in a table format from any datasource that might be used for a mailmerge. For a non-mailmerge implementation with an Excel datasource, see: http://www.msofficeforums.com/mail-m...html#post67097 and subsequent posts in that thread. A DATABASE field can also be used in a mailmerge. In either case, a working knowledge of SQL is required.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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