Results 1 to 5 of 5

Thread: Directory merge

  1. #1
    New Lounger
    Join Date
    Oct 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Directory merge

    Hi Paul

    After several days of trying to understand the sticky note at http://windowssecrets.com/forums/sho...merge-Tutorial, forgive me for my attempt to slef educate, but I cant see how you achieved the merge records [by catagory] on page 3 and 4 to achieve the combined representatives by state/office.

    Grasping this as a new user to coding word, man, difficult, not to mention the '[' brakets that are used, - are they just to highlight the field codes in the tutorial or inserted to complete a function?

    When I attempt to assemble the document using the tables and document dowloaded from the sticky, I get repeated individuals one page at a time, not grouped as in the example.

    What am I missing here I have followed all of the steps as documented and im boing bals here
    Last edited by Mud Duck; 2013-10-10 at 18:01.

  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
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,854
    Thanks
    0
    Thanked 176 Times in 162 Posts
    Hi Mud Duck,

    Did you read the 'Viewing The Fields' topic? That explains both why the square brackets are used and how to view the fields they encompass. As for one page per record, that suggests you haven't followed the instructions for grouping the records and/or you're using a letter merge instead of a directory/catalogue merge.

    PS: Please don't hijack the ongoing discussions in other threads. Even if you have a related issue, start your own thread. I've now split your post off into a new thread.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #3
    New Lounger
    Join Date
    Oct 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Paul

    Sorry, about that Paul, no intention to hijack.

    Seeing so many varients on formulas, with out spaces, then reading there critically important, reading numbers in quotes "1" and then without, its all very confusing to follow.

    IE: are these same but different?

    {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}
    “}

    ---------------------------------------------------

    { IF { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶
    " "" }{ SET Place1 { MERGEFIELD CITY }}¶
    { If { Place2 } <> { Place1 }"¶
    { MERGEFIELD CITY }¶

    { MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}

    -----------------------------------------------------

    Cant believe what is seen as a simple task needs a detailed IT in C++ programing back ground

  5. #4
    New Lounger
    Join Date
    Oct 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It would appear I cant work out the nestling {} above. Is there a rule of thumb or way to make this task simpler. For the life of me I cant get the same number of {} as shown in any of the examples when trying to recreate the code? What may I be doing wrong

    Example from forum =

    { IF { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶
    " "" }{ SET Place1 { MERGEFIELD CITY }}¶
    { If { Place2 } <> { Place1 }"¶
    { MERGEFIELD CITY }¶

    { MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}


    My Attempt to nestle: I end up with more ‘}}’ at the end and one less on line 2 after " ""

    { IF { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶
    " "" { SET Place1 { MERGEFIELD CITY }}¶
    { If { Place2 } <> { Place1 }"¶
    { MERGEFIELD CITY }¶

    { MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}} "Extra here"

    ? Very confused,

  6. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,854
    Thanks
    0
    Thanked 176 Times in 162 Posts
    Neither of your field code examples comes from the tutorial and I'm not in a position to do a detailed evaluation. That said, Word's field coding, as with any programming language, has its own syntax which, if violated, won't produce the desired results. In the various tutorials I've produced, I've tended to reduce the number of spaces and other characters used in the code to the bare minimum. Typically, therefore, one can't have any fewer spaces & quotes than I use.

    Whether one has double-quotes around a number is of no consequence - but it would matter if one were evaluating a string with spaces. This code:
    { IF { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶
    " "" }
    is functionally equivalent to:
    {IF{MERGESEQ}= 1 "{ MERGEFIELD CITY }¶
    "}
    you'll note that the only quotes of importance are those delimiting the output - which includes a paragraph break not included in the mergefield.

    If you're trying to use the field codes from the tutorial, I'd recommend simply copying & pasting the appropriate set from there into your own document, then modifying the mergefield names to suit your requirements. You can also modify the associated text and paragraph formatting. That way, you obviate the need to ensure you're doing all the nesting correctly. I should also point out that, no-one else has ever published directory/catalogue mailmerge field coding with anywhere near the sophistication of what you'll find in the tutorial.

    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

    If doing what you're trying to achieve seems too hard with the field coding, there's always the option of using one of the Many-to-One Mail Merge add-ins, from:
    Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or
    Doug Robbins at https://skydrive.live.com/?cid=5aedc...615E886B%21566
    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
  •