+ Reply to Thread
Results 1 to 3 of 3

Group Fields in Mail merge based on common field

  1. #1
    Registered User
    Join Date
    08-06-2015
    Location
    England
    MS-Off Ver
    2013
    Posts
    68

    Group Fields in Mail merge based on common field

    Hi there! I have a task at work that requires the use of mail merge letters (these are to be printed in the end not sent via email).

    Basically, we have a database of companies that are grouped in their own categories (column B - "Group" in the spreadsheet), each purchasing a product valued at one of two costs. Cost 1 refers to payments before a certain date and Cost 2 refers to later payments. In the letters, we are trying to show the clients (Column C - "Client Name) how much they would have to pay before and after the date (the date is 1st April but is irrelevant here as the prices have already been set in the spreadsheet). Furthermore, if the clients decide to buy multiple products, they get a discounted total price (column E - "Reduced Cost 1" and column G - "Reduced Cost 2"), also based on when they make the payment. In my table, I chose to put the discounted total price for all the lines but I really only need it for a total number.

    What I am trying to achieve is to be able to save and print individual letters per group. I've tried adapting some code I found online but I can't make it work. To make it worse, we absolutely have to use a table in word to show all the clients and the prices. this only confuses me further as I could find no code to help with setting up the data in a table in Word the way I need it. i have attached the spreadsheet with some sample data (i have over 90 groups) and also how the document looks before the mail merge and how I would like it to look like in the end.

    I wouldn't mind having to change the spreadsheet to get it into a better format for the mail merge, it doesn't have to have this current format. My requirements are to get 1 letter per group and keep in the table in Word.
    Any help would be greatly appreciated. Thanks

    FYI: I've tried the following links:
    https://www.youtube.com/watch?v=bld2UWKdTmo
    https://www.youtube.com/watch?v=4Ck8KAwAQso
    http://www.stacydubois.com/2013/01/t...g-problem.html
    I've also posted on Mr Excel Forum - http://www.mrexcel.com/forum/general...mon-field.html
    Attached Files Attached Files
    Last edited by Sinon05; 03-04-2016 at 05:16 AM.

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,831

    Re: Group Fields in Mail merge based on common field

    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:
    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 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

    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]

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,831

    Re: Group Fields in Mail merge based on common field

    Cross-posted at: http://www.mrexcel.com/forum/general...mon-field.html
    Please read the Cross-Posting policy in rule #8: http://www.excelforum.com/forum-rule...rum-rules.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mail Merge - Merge fields lister macro
    By adil.master in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2015, 10:33 AM
  2. Replies: 12
    Last Post: 09-17-2013, 10:55 PM
  3. Merge multiple spreadsheets with common field
    By sbarry50 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2010, 11:42 AM
  4. Merge 2 Worksheets; One Common Field
    By sheisgeeky in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-30-2008, 01:26 PM
  5. Mail Merge Query - Format of Merge Fields in Word
    By carlosbourn in forum Excel General
    Replies: 2
    Last Post: 11-10-2007, 07:11 AM
  6. Mail merge, group rows
    By mickyjune26 in forum Excel General
    Replies: 1
    Last Post: 04-24-2007, 07:45 AM
  7. [SOLVED] Open a mail merge from excel: common problem
    By lightspeed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-21-2006, 09:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1