Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2001
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    if loop mailmerge (2000 SR1)

    I am merging an Excel file into a Word table, one row of info goes in each table, and that is working fine.

    Now, I want to have headings (this info is in 2 columns in my spreadsheet) grouping each table, for example:

    1.0 Parts
    1.1 Car Parts
    ***all the tables in 1.1***
    1.2 SUV Parts
    ***all the tables in 1.2***
    etc.
    2.0 Documentation
    2.1 Car Documentation
    ***all the tables in 2.1***
    2.2 SUV Documentation
    ***all the tables in 2.2***
    etc. etc.

    I have the code from WD97: How to Merge Conditional Number of Records to the Same Page (Q105888) (the MS knowledgebase concerning 1 loop), but am at a loss to modify it to loop twice for two headers, as in my case.

    Please help!

    Tags added by Mod.

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: if loop mailmerge (2000 SR1)

    The problem is fairly complex. You need another field to indicate "car" & "suv". Then you would end up with another nested field. I'm sorry that this is vague, but I don't have the time to work it out at present.

    Perhaps you can get an idea of how to proceed from what I've said above. If not, maybe someone else can jump in.

  3. #3
    New Lounger
    Join Date
    Aug 2001
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: if loop mailmerge (2000 SR1)

    Ok. I tried nesting my loops, and got an error, "You cannot insert DATA, NEXT, NEXTIF, or SKIPIF fields inside other fields."

    Obviously this isn't as straightforward as I was hoping. I'd appreciate any help I can get...
    Here's what I tried:

    {set duplicateBP {if{MERGEFIELD CheckBP}="1" "off" "on"}} {nextif{MERGEFIELD CheckBP}="0"}
    {if{duplicateBP}="on" "my text and table here, then
    { set duplicate {if{MERGEFIELD CheckBSP}="1" "off" "on"}} {nextif{MERGEFIELD CheckBSP}="0"}
    {if{duplicate}="on" "my text and table here
    "}"}

Posting Permissions

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