#1
|
|||
|
|||
Mail Merge Suppression issue
Hello,
I have a dataset which includes several criteria for Mail merge. However, those which contain a zero value should not be included in the merge, and the line they exist on should be suppressed to ensure good formatting. However, I am unable to achieve this. Essentially, it's this. The data is in Excel, with Field name, and field value) Field Name 1: £100 (this should be included) Field Name 2: £0 (this should be suppressed) Field Name 3: £120 (this should be included) *Just to add, the title (shown as Field Name 1 etc.) also needs to be suppressed. Is there anything I can do to achieve the desired outcome? Thank you so much for any help! Gio |
#2
|
||||
|
||||
You could use a series of conditional fields e.g as follows. Use CTR+F9 for the bracket pairs and press the enter key where you see ¶
{ IF { MERGEFIELD "Field Name 1"} > 0 "Field Name 1: { MERGEFIELD "Field Name 1" \# "£.0"}¶ "}{ IF { MERGEFIELD "Field Name 2"} > 0 "Field Name 2: { MERGEFIELD "Field Name 2" \# "£.0"}¶ "}{ IF { MERGEFIELD "Field Name 3"} > 0 "Field Name 3: { MERGEFIELD "Field Name 3" \# "£.0"}¶ "}
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Quote:
|
#4
|
||||
|
||||
You insert all of it where you want the result to appear. It will show those fields and their leading texts where the values are greater than 0
{ IF { MERGEFIELD "Field Name 1"} > 0 "Field Name 1: { MERGEFIELD "Field Name 1" \# "£,0"} "}{ IF { MERGEFIELD "Field Name 2"} > 0 "Field Name 2: { MERGEFIELD "Field Name 2" \# "£,0"} "}{ IF { MERGEFIELD "Field Name 3"} > 0 "Field Name 3: { MERGEFIELD "Field Name 3" \# "£,0"} "} You can use Import and export field constructions as text if you wish to convert the text above to fields (change the text as appropriate)
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
Thanks again.
When I do as instructed, the result is that the word MERGEFIELD appears - but no other information, neither with or without preview results selected. Clearly I am faulting somewhere - any ideas? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail Merge Code Issue | Andrewwill | Mail Merge | 6 | 01-06-2018 10:25 PM |
Mail merge repeating decimals issue | jmorris33 | Mail Merge | 2 | 01-10-2015 11:54 PM |
Mail Merge Formatting Issue with Conditional IFs | robbeh | Mail Merge | 5 | 07-08-2014 07:39 AM |
time field issue in mail merge | Aude | Mail Merge | 16 | 05-18-2014 06:22 AM |
Word 2007 mail merge issue | steelervince | Mail Merge | 0 | 02-17-2010 02:26 PM |