#1
|
|||
|
|||
Mail Merge on Optional Row(s) of a Table
To Admin.,
May I know how to perform the mail merge from excel for optional row(s) of a table in word as attached below: Thank you very much in advance!! Chris |
#2
|
||||
|
||||
All that needs is some IF fields to conditionally output the optional data.
For example: {IF{MERGEFIELD Status1}= "Y" "the table row for Status1 goes here"} {IF{MERGEFIELD Status2}= "Y" "the table row for Status2 goes here"} Although this generates a separate physical table for each row, you can minimise the gap by formatting the intervening paragraph spaces (which have to be included in the field code anyway) as hidden. The alternative is to test for all possibilities via IF fields and output a single table having anything from 1 to 3 rows, according to which conditions are met. Note: The field brace pairs (ie '{ }') for the above examples are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Dear macropod,
Thank you very much, and it's working fine!! Have learnt lots of skills in the meantime too : ) Best Regards, Chris |
#4
|
|||
|
|||
I have the same use case for the optional rows. Is there a way to include a column in the table that will number the rows correctly (1, 2, 3) depending on which rows are visible? I used the SEQ field and it counts the rows that are hidden with the IF statement, so an example would show Row 1, Row 3, Row 5 and I want it to display 1,2,3 but it still shows 1,3,5. Is there a way to do this conditional numbering in the mail merge?
Also, how do you minimize the spacing between the individual tables? I am unable to remove the paragraph symbol between the " and the inserted table, or replace it with a line break. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail Merge to create specific number of table rows | flackend | Mail Merge | 4 | 12-01-2023 02:49 PM |
Directory Mail Merge with table layout | 3N1GM4 | Mail Merge | 11 | 06-03-2014 09:54 PM |
Mail Merge Into Dynamic Table | Jag618 | Mail Merge | 1 | 03-04-2013 11:26 PM |
mail merge with table | nadja | Mail Merge | 5 | 03-06-2012 05:41 PM |
Insert formatted table into word (mail merge) | manojbmsce | Mail Merge | 0 | 09-25-2008 02:25 AM |