#1
|
|||
|
|||
Mail merge how to link mail merge field value to a column heading
Hi, I'm creating some labels for delivery boxes and thought that mail merge would be the way forward. My labels contain i) the delivery details (name, address, postcode) and ii) the names of the items in the box and the volume.
I have managed to achieve this but, in the example attached, where I have '0' volume for a particular box item I don't want that item to be displayed at all, e.g. in the bread section if 'Fig & Red Wine' is '0' then I want to find a way of not returning the hardcoded text. I've tried fiddling around with IF statements and switches but can't get anything to work. Is there a way of inserting the column headings as merge fields and then making their appearance contingent on the existence of values other than 0 in my data? Your help would be greatly appreciated. Kind regards Dan |
#2
|
||||
|
||||
To do this, you would have to redesign your document so that each row in the sub-tables is a separate table in its own right and embed that one-row table in a field coded along the lines of:
{IF{MERGEFIELD Fig__Red_Wine}> 0 "|Fig & Red Wine|{MERGEFIELD Fig__Red_Wine}|"} where the '{}' represent the field brace pairs and the '|' represents the left/right cell borders. Along the same lines, if you want to suppress the headings also when all rows for a sub-table are empty, you'd need to embed that in a field coded along the lines of: {IF{={IF{MERGEFIELD Fig__Red_Wine}= 0 0 1}+{IF{MERGEFIELD Rustic_French}= 0 0 1}+{IF{MERGEFIELD MultiSeed}= 0 0 1}+{IF{MERGEFIELD Focaccia}= 0 0 1}}> 0 "|Bread|"}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mail merge using data from column A as placeholder. | keys | Mail Merge | 2 | 10-31-2013 01:55 AM |
How to ignore a mail merge field if the field is blank | redzan | Mail Merge | 1 | 05-16-2013 08:34 AM |
How big can a mail merge field be? | Engineer | Mail Merge | 2 | 12-11-2012 01:20 AM |
Mail Merge / DSN / Data Link / MySQL | Bob Young | Mail Merge | 5 | 05-18-2012 03:44 PM |
Mail Merge Anchoring column layouts | HWSpencer | Mail Merge | 0 | 04-25-2008 06:08 AM |