Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    You probably know that field codes need to be entered with special braces (e.g., using Ctrl+F9 or the Insert>Field dialog) and cannot be easily copied and pasted from online examples. However, field codes often are nested one, two, three layers deep, so it is easy to miss one here or there and that can break the solution. Something to check for.

    Can you post a sample file showing how you are setting up or want to set up your fields? If you have a sample data source, you can zip them together and post them as a single attachment.

  2. #2
    New Lounger
    Join Date
    Sep 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mailmerge - Creating Sorted Listings - (word 2007)

    <P ID="edit" class=small>(Edited by macropod on 08-Sep-08 08:51. Added link to post 731107)</P>i have searched for (an embarrassing) amount of time to find the answer to my question. can i create "grouping" in a mail merge in word 2007 from access. when i finally came across this document - Mailmerge Tutorial: Create Sorted Listings (2000-2007) in <post#=731107>post 731107</post#> - it helped significantly. (thank you). The Key field, if and Set are defined but it does not explain how to set them up. I just used the layouts described in the article but my format/layout did not match. i only put the data fields in like the article said. i had no additional data (like the If and set) at the start of the Word Directory page. is this explained somewhere else? your help is greatly appreciated.

    in addition, when i went to other sites that were recommended (e.g. using the city/employee/sales table as the example). when i wrote my own mergeseq, etc - half of the text was included in the final merge (very confusing). it did populate the fields specified but many of the text written in the code appeared as well.
    most kindly, julie

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    Hi Julie,

    Welcome to the Lounge!

    For the most part, you should be able to simply copy the desired field coding from the tutorial and paste it into your own mailmerge document, then replace the mailmerge fields with whatever your equivalent ones are, including changing the mailmerge field used for the 'key' to whichever of your fields you want to use to trigger the different groupings - you may even need to more or fewer mergefields, but that should all be straightforward. And, of course, you'll need to change the field layouts & formatting to suit your needs.

    As for the MSKB articles I referred to, there are some issues with the field coding suggested there, which is why I wrote my own versions and incorporated them into <post#=731107>post 731107</post#>. The other thing to note about those articles is that they don't contain the actual field codes - only text representations of them. That's why they don't work as is.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #4
    New Lounger
    Join Date
    Sep 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    thank you all for the responses. I have read and tried applying the changes to this type of format and can not get my files to work.

    { IF { MERGESEQ } = "1" "{ MERGEFIELD City }" "" }<ENTER>
    { SET Place1 { MERGEFIELD City }}<ENTER>
    { If { Place2 } <> { Place1 }"<ENTER>
    { MERGEFIELD City }<ENTER>
    <ENTER>
    { MERGEFIELD Employee }{ MERGEFIELD Sales }" "{ MERGEFIELD Employee }{ MERGEFIELD Sales }" }{ SET Place2 { MERGEFIELD City }}<ENTER>

    my data looks like this:
    Lastname Firstname Grade Class Teacher FamilyID
    Agardh Hanna K K4 Van Orden 123
    Agardh Johan 2 07 Gawle 123
    Agbulos Jenna 4 B6 Lally 1
    Agbulos Johnny 5 10 King 1

    I would like to be able to group by and then merge into:

    FamilyID

    Last Name First Name class grade

    thank you kindly for your help. julie

  5. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    Hi Julie,

    Try the attached. It includes both a main mailmerge document and sample Excel data file.
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  6. #6
    New Lounger
    Join Date
    Sep 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    Thank you for that. i am still confused. when i opened the word doc this is what i saw:
    Agardh, Hanna K4 K

    when i "finished & merged" i saw this Family#123 only.

    two questions: 1. how can i get a merget to look like the following:

    FamilyID#123
    Agardh, Hanna K4 K
    Agardh, Jonah 2 7

    FamilyID#1
    Agbulos, Jenny 4 B6
    Agbulos, Johny 5 10


    where is the text you wrote like (e.g. { IF { MERGESEQ } = "1" "{ MERGEFIELD City }" "" }<ENTER>
    { SET Place1 { MERGEFIELD City }}<ENTER>
    { If { Place2 } <> { Place1 }"<ENTER>
    { MERGEFIELD City }<ENTER> etc...

    so i can learn from what you created. i only see the merge and would like to see what you wrote.
    Kindly, Julie

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    Did you scroll down the resulting document? Family #1 is on page 2.

    If you open the Word document from macropod's zip file, then press Alt+F9, you will see the field codes that he used (see screenshot below). When you're done studying them, press Alt+F9 again to hide the field codes.
    Attached Images Attached Images
    • File Type: png x.png (6.0 KB, 5 views)

  8. #8
    New Lounger
    Join Date
    Sep 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    Thank you. No, there was no page two. just page 1 with Family#123 -
    Part of my confusion. I used the word document you sent and there was only one ID listed.
    ideally, it would be best if they did not separate to different pages but ran on together on one.
    Thank you for taking the time to help. If i can get this last issue resolved, i will be good to go.
    kindly, julie

  9. #9
    New Lounger
    Join Date
    Sep 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    Sorry. one last comment. in the final merge - it only listed familyID# and no other data.
    can it read

    FamilyID
    last name, first name class grade
    last name2, first name2, etc

    next familyID
    last name3, first name, class grade
    last name4, etc

    (with the last name counting refering to different data rows with that family ID number.
    Kindly, julie

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    I have attached a zip file with a version of the document with the page break (the QUOTE 12) field replaced with a paragraph mark. I have also included the result that I get when performing the mail merge in Word 2002 SP3 (I don't have Word 2007).
    Attached Files Attached Files

  11. #11
    New Lounger
    Join Date
    Sep 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    thank you. i get it. i really apprecaite you taking the time. i hope other people benifit from this string as i looked everywhere.

  12. #12
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    Hi Julie,

    I suggest you re-read the tutorial. Amongst other thing, it explains how the merge process works and how to view the field coding - both of which you seem to have been having trouble with.

    An understanding of how & why the code works will be helpful if you're to be able to modify the code to suit your needs. You might, for example, want to incorporate the technique into merged letters to parents, which would most likely entail adding text after each set of records.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  13. #13
    New Lounger
    Join Date
    Sep 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    i have taken all you guys have adviced and have gotten very close to my needs. i am trying to create a second set and have attached the relavent documents. can you help me - i included in the word doc results what the merge results and what i want it to look like. your help is greatly apprecaited. kindly, julie
    Attached Files Attached Files

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    I'm sorry, I cannot help you with this. You need the last example from macropod's tutorial, and that doesn't work on my PC (I'm using Word 2002, not 2007).

  15. #15
    New Lounger
    Join Date
    Sep 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge - Creating Sorted Listings - (word 2007)

    thank you. i have saved it in 97 format - will that help. i can not get it to work - i have read the instructions. kindly, julie
    Attached Files Attached Files

Page 1 of 2 12 LastLast

Posting Permissions

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