Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Oct 2014
    Thanked 0 Times in 0 Posts

    Unhappy Merge From Excel With Table in Word - Next Record If Excel Column Same?

    I ready the thread here: 111149-Catalog-Mailmerge-Tutorial-Discussions I have tried to go through everything, but I just can't seem to get it. I have a mail merge that has data in Excel. The word merge needs to be a table. The table has a first row with the field from column A. Then the next row in the word table is split in 2 columns. This is where the next 5 fields from excel go. They go in the first column of the word table, like an address block. The next record should be in the right column of the table, etc, if the first column at the top of the word table is the same as the previous row in excel. The merge should make a new page with a new table, only if the first column is different than the previous record. Looking around, I am not sure how to do this.

    So let's say this is a data set of music. It would be the name of the CD, and then who to send it to. Each row of excel would be like this:

    So the word doc would have cd1 at the top row of a table. The 2nd row split in 2 columns, so that the first recipient block goes in the first column. The next record is the same cd, so it just goes in the next column in the word table. If the CD name changes, then we go to a new page and put the new CD in a new table as the first table row/column (centered).

    I tried the tutorial with the directories and catalogs, but it is really confusing. I tried to set this up, for the CD to be the key, but it doesn't seem to listen. This is what I have:
    {If { MERGEFIELD CD }<> {Key}{QUOTE 12}} { MERGEFIELD CD } {Set Key { MERGEFIELD CD }}}

    I want to do a page break when the CD changes, but can't seem to get that to work.

    Does this make sense? If anyone can help, I would appreciate it.

  2. #2
    Super Moderator macropod's Avatar
    Join Date
    May 2002
    Canberra, Australian Capital Territory, Australia
    Thanked 465 Times in 382 Posts
    Cross-posted at:
    For cross-posting etiquette, please read:

    Have you looked at any of the links to the completed examples in the cross-post thread? The is also a great deal more to the field code than what you've posted, which suggests you haven't even read the tutorial's introduction.
    Last edited by macropod; 2014-10-16 at 01:54.

    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