Forum Discussion
fabiodero79
Mar 03, 2019Copper Contributor
Nextif Function and Mail Merge
Hello, I am trying to get a mail merge where I want separated email to be sent to a list of accounts. I would like James Green to receive one email only stating: 21/11/2018 89 26/12/2018 3...
Wxcloud
Nov 18, 2022Copper Contributor
ive been working on this for couple of days, it seems that MS word is not quite prepared for our particular need.
but good news is that i find a way.
you have to add a new column in your source, indicating the times of a single person appears. LIKE:
Name | Date | Amount | times |
James Green | 21/11/2018 | 89 | 2 |
James Green | 26/12/2018 | 34 | 2 |
Thomas Reed | 14/12/2016 | 22 | 3 |
Thomas Reed | 27/05/2018 | 88 | 3 |
Thomas Reed | 14/12/2016 | 22 | 3 |
Thomas Reed | 29/05/2018 | 16 | 3 |
NOW you add a table to your base document , and insert these mergefields to the table
FIRST LINE: {MERGEFIELD Date}
SECOND LINE : {NEXTIF {MERGEFIELD times} >= 2 } {IF {MERGEFIELD times} >= 2 {MERGEFILELD Date}}
THIRD LINE : {NEXTIF {MERGEFIELD times} >= 3 } {IF {MERGEFIELD times} >= 3 {MERGEFILELD Date}}
....
XX th LINE : {NEXTIF {MERGEFIELD times} >= XX } {IF {MERGEFIELD times} >= XX {MERGEFILELD Date}}
MERGE , HOPE IT WORKS.