Is there a way to hide a single page in multi-page mail merge document?

Copper Contributor

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? 

 

5 Replies
You should be able to do what you want by the use of If...then...Else fields.

If you need assistance, use the full text editor to respond, so that you can upload a copy of your mail merge main document and the data source so that we can help you to set it up.

@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!

@Kathleen-KMB 

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

Doug_Robbins_Word_MVP_1-1642200464540.png

 

and inside the closing field delimiter }, which will be on the next page, insert a " as shown below

 

Doug_Robbins_Word_MVP_2-1642200611774.png

 

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.

@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

@Kathleen-KMB 

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.