Insert Page Break

Hello Support,

Is it possible to add a page break based on a if condition.

{IF{ MERGEFIELD x}= "Y" insert page break}

Can you please demonstrate with an example.

Thanks,

ValuePRO

Hello
Thanks for your request. Please see the following code and the attached template:

Document doc = new Document("C:\\Temp\\in.docx");
doc.MailMerge.Execute(new string[] { "MyField" }, new object[] { 0 });
doc.Save("C:\\Temp\\out.docx");

Please let me know in case of any issues, I will be glad to help you.
Best regards,

Thank you for quick answer :slight_smile: