Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Jun 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Many to One Word Merge toggle Codes

    I am really hoping someone can help me. I have read the tutorial, another blog, and watched a video but I am still unable to get my toggle field coding correct for my merge. I downloaded a many to one app but it causes a separate word document for each merged page – which will be very cumbersome for my purpose.

    My resulting document will be a “sign” for a charity auction package with the Package Number and Name, and the list of items contained in that package. The Package Number is the key field. Some packages contain multiple items – but each item is a separate record in the excel spread sheet. I need each Package on a separate page. Sample:

    Package 101
    “Be My Valentine”
    $150 Value
    Granite Restaurant $75 Gift Card $75
    John’s Hallmark $25 Gift Card $25
    Van Otis Candy Basket of assorted Chocolates $50
    ___page break___

    My data source Headings are: “Package Number – Package Name – Package Value – Donor company – Item description – Value and Restrictions” Can someone PLEASE tell me what the toggle codes should be?

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,509
    Thanks
    3
    Thanked 143 Times in 136 Posts
    Try taking the spaces out of the data source headings in Excel and then try again. Merge fields can be picky with the names of fields and generally it is good practice to avoid spaces in field names.

    Something along the lines of 'PackageNumber' or 'Package_Number' should work
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #3
    New Lounger
    Join Date
    Jun 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, I will try changing the field names, however that does not seem to be my issue. I need to figure out the toggle codes to get the multiple items to appear, and I need to figure out how and where to insert the page break. This is what I have so far:


    {MERGEFIELD "Package_Number" { If { MERGESEQ } = "1" "{ MERGEFIELD package_Number }¶
    " ""}{ SET Place1 { MERGEFIELD package_number }}¶
    { If { Place2 } <> { Place1 }"}

    {MERGEFIELD "Package_Name"}

    {MERGEFIELD "Package_Value_"}


    {MERGEFIELD “Donor_Company”} {MERGEFIELD “item _Discription”} {MERGEFIELD “Value”}


    I am pretty sure I need an additional toggle code somewhere else –( maybe in “donor company” ??) but can’t figure out what that should be. Can you help me with this?

  5. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,863
    Thanks
    0
    Thanked 179 Times in 165 Posts
    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
    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.

    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
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  6. #5
    New Lounger
    Join Date
    Jun 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Paul,
    At this point I am ready to throw in the towel. From what I am reading and the samples I can see there appear to be multiple coding options that should work, but choosing the right combination must require a PhD from MIT! For the life of me I cannot get the multiple items to appear - even using the EXACT codes from the Tutorial and meticulously substituting my field names, which I revised to be shorter and just one word each, does not work. Based on your response, I guess the coding I used in my post 06-07 -2013 at14:32 is not good, even though I copied that format from an example earlier in this thread that does work for someone else. Using the example in post#23345 as you suggested - the sample with the donations to a church, with some donors giving multiple times a year, doesn't work - yet it is nearly identical to what I need to create.

    Using the Tutorial example AND Tutorial Data Source, I tried to recreate the page break version on page 7 of the Tutorial, "Force Each New Category To a New Page" but I can't. I can't tell if there are actually 4 fields inserted into the doc or just one. Assuming that 4 fields are inserted, I can't see where the toggle codes for "STATE" ends and "City" begins, is there supposed to be coding for "Representative" or "Sales" ?

    So am I beyond hope? I really am not a simpleton, this can't possibly be this difficult. I am extremely frustrated at this point and could really use some specific guidance if at all possible.

  7. #6
    New Lounger
    Join Date
    Jun 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In the following set of Toggle codes, copied from page 7 of the tutorial, can you tell me where the toggle codes for each of the 4 fields starts and ends? The 4 fields are: STATE - CITY – REPRESENTATIVE – SALES.

    {QUOTE{IF{MERGESEQ}= 1 {SET Key “”}}”{IF{MERGEFIELD CITY}<> {REF Key \* MERGEFORMAT } “{IF{MERGESEQ}> 1 {QUOTE 12}}{MERGEFIELD State} {MERGEFIELD City}{SET Key {MERGEFIELD City}}

    “ } {MERGEFIELD Representative} {MERGEFIELD Sales}
    “}


    Also, how important are CAPITAL letters?
    Is there a difference between a bracket that is bold and one that is not?
    Please and thank you.

  8. #7
    New Lounger
    Join Date
    Jun 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Anybody? anything? Please? and Thank You!

  9. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,863
    Thanks
    0
    Thanked 179 Times in 165 Posts
    Hi rhendricks,

    I've been OS for 3½ months, hence the delay in replying. Have you resolved the issue, or do you still need help?
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  10. #9
    New Lounger
    Join Date
    Jun 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Paul,
    I thought I just annoyed the heck you of you so you were ignoring me - hahaha! But I did resolve the problem. The real answer is that a Many to One merge is really a series of If-Then-Else statements within an If-Then Else statement. Ironically, this is what I was thinking when i first looked into how to do them about a year ago - but no where in any of the manuals or blogs does it actually say that so i got way off course. Instead there are instructions based on the assumption that anyone who is reading them knows this basic premise. Once you understand that fact, you realize you are not actually typing any of the statements - but inserting them using keystrokes like "control F9". or the insert rule function. Formatting the layout is the next trick that we fiddled with since that all has to be withing the master if-then-else" as well. In the end - we wrote our own "tutorial".

    Thanks for getting back to me I really do appreciate the help!
    Rosemary

Posting Permissions

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