Hi all,
Looking at the examples displayed on this page, I created a mail merge to generate some quote letters. Overall the letters look good, however I need add a section similar to address part where the content needs to be written once, not repeated like products.
To be more clear, there are three sections in my letter:
A- Company info and contact details- Printed once on each letter
B- Products info- Repeats as many times as there are products, so probably a loop.
C- Closing info- Closing note for each letter.
The problem I am having is with the closing info, since right after the products, I am checking if the customer is same or not, I am having hard time to place the correct data into the closing info section.
Below is the code that I am using:
{QUOTE {IF{MERGESEQ}= 1 "{SET Key ""}{SET Person ""}" "{SET LastPerson {Person}}"}{IF{QUOTE{MERGEFIELD
Customer_Name}}<> {Key} "{ MERGEFIELD InternalText1 } {IF{MERGESEQ}> 1 "{SET LastPerson {Person}}
[highlight #FCE94F]We look forward to your next order.
{ MERGEFIELD InternalText1 }
Sincerely,
_________________________________
John Doe[/highlight]
{IF{MERGEFIELD Customer_Name}<> 0 "
-------------page break--------------------
"}"}{IF{MERGEFIELD Customer_Name}<> 0 "{SET Key {QUOTE{MERGEFIELD Customer_Name}}}{SET Person
{QUOTE{MERGEFIELD Customer_Name}}}
{MERGEFIELD Customer_Name }
{MERGEFIELD Contact } {DATE \@ "MMMM d, yyyy"}
{MERGEFIELD Address1 }
{MERGEFIELD City }{MERGEFIELD State \b " "}{MERGEFIELD Zip \b ","}
Dear {MERGEFIELD Name}
Thank you for your business. The following are updated prices:
Product Units Price QC Code Your Code
"}"}"{IF{MERGEFIELD Customer_Name}<> 0 "{MERGEFIELD Product_Name} {MERGEFIELD Size}
{MERGEFIELD Unit} {MERGEFIELD Form} {MERGEFIELD
Final_Price\# $#,##0.0000 } {MERGEFIELD ProductID} {MERGEFIELD Customer_Text}
"}"}
The highlighted section will pick up the info from the next company, not the current one. What's the correct placement of this mergefield, so that it shows the right info at the right spot.
Thank you in advance,
G
Looking at the examples displayed on this page, I created a mail merge to generate some quote letters. Overall the letters look good, however I need add a section similar to address part where the content needs to be written once, not repeated like products.
To be more clear, there are three sections in my letter:
A- Company info and contact details- Printed once on each letter
B- Products info- Repeats as many times as there are products, so probably a loop.
C- Closing info- Closing note for each letter.
The problem I am having is with the closing info, since right after the products, I am checking if the customer is same or not, I am having hard time to place the correct data into the closing info section.
Below is the code that I am using:
{QUOTE {IF{MERGESEQ}= 1 "{SET Key ""}{SET Person ""}" "{SET LastPerson {Person}}"}{IF{QUOTE{MERGEFIELD
Customer_Name}}<> {Key} "{ MERGEFIELD InternalText1 } {IF{MERGESEQ}> 1 "{SET LastPerson {Person}}
[highlight #FCE94F]We look forward to your next order.
{ MERGEFIELD InternalText1 }
Sincerely,
_________________________________
John Doe[/highlight]
{IF{MERGEFIELD Customer_Name}<> 0 "
-------------page break--------------------
"}"}{IF{MERGEFIELD Customer_Name}<> 0 "{SET Key {QUOTE{MERGEFIELD Customer_Name}}}{SET Person
{QUOTE{MERGEFIELD Customer_Name}}}
{MERGEFIELD Customer_Name }
{MERGEFIELD Contact } {DATE \@ "MMMM d, yyyy"}
{MERGEFIELD Address1 }
{MERGEFIELD City }{MERGEFIELD State \b " "}{MERGEFIELD Zip \b ","}
Dear {MERGEFIELD Name}
Thank you for your business. The following are updated prices:
Product Units Price QC Code Your Code
"}"}"{IF{MERGEFIELD Customer_Name}<> 0 "{MERGEFIELD Product_Name} {MERGEFIELD Size}
{MERGEFIELD Unit} {MERGEFIELD Form} {MERGEFIELD
Final_Price\# $#,##0.0000 } {MERGEFIELD ProductID} {MERGEFIELD Customer_Text}
"}"}
The highlighted section will pick up the info from the next company, not the current one. What's the correct placement of this mergefield, so that it shows the right info at the right spot.
Thank you in advance,
G