Jan 12 2022 05:52 AM
Hi! Mail-merge newbie here...I am trying to determine if it's possible to hide a single page with no mail merge data, that is contained in a multi-page mail-merge document.
Within Salesforce, we are using a platform called Conga to generate a customer invoice that is to be printed and mailed, after they have completed their order. We have setup the document to contain 3 pages, each of which contains information for a different type of ticket that they can purchase (each of these pages contain static and mail merge data). They can buy any combination of the ticket types.
If customer A buys ticket type 1 and 3, but not 2, is there a mail-merge field or code that can be embedded to not have the ticket type 2 page included in the final document export?
Jan 13 2022 01:06 AM
Jan 14 2022 09:39 AM
@Doug_Robbins_Word_MVP awesome, thank you Doug!
Here is a download link: Dummy Lottery word doc
As for the data source, this word doc is loaded into Salesforce and the data is generated through Conga. Let me know if you need more details!
Jan 14 2022 02:52 PM
While I do not know anything about Salesforce and Conga, if it were a normal mail merge operation, you would select each page of the document and press CTRL+F9 to enclose the page in a pair of field delimiters { } After the opening { you would insert
{ IF { MERGEFIELD "Ticket #1" } <> "" "
as shown below
and inside the closing field delimiter }, which will be on the next page, insert a " as shown below
This process would be repeated for each page of the document. If the field that dictates whether or not a ticket is valid, is something different from the "Ticket #1", "Ticket #2" and "Ticket #3" that I have assumed, you would replace my assumptions with the relevant field.
I have uploaded the modified document.
Jan 20 2022 02:40 PM
@Doug_Robbins_Word_MVP thanks for the response Doug! We ran it through the system and it works, however, the last page is still exporting as a blank page (if there is no mail merge data for ticket type 3).
So the scenario would be the customer is purchasing Ticket type 1 and 2, but not 3 — Is there a way to eliminate that last blank page? I have attached the updated word doc.
Let me know if you have any specific questions and I will try to clarify
Jan 20 2022 03:43 PM
I have uploaded a modified version from which the manual page breaks have been removed and the first paragraph of the ticket 2 and ticket 3 sections has been formatted to have a page break before it.