Free Support Forum - aspose.com

Mail Merge Issues. Aspose behaviour with Merge Fields

Hello there.

I have uploaded the trial version for Aspose Words in .Net. I am really pleased to see that it almost fulfill our project requirements but we have some confusions.

First of all, during mail merge, if we have any merge field say <> and the database or a query returns null or empty, in that case how does aspose behaves. What i have seen that it puts a blank empty line in place of the merge field. What our project requirement is that blank line should not come.

Second, we want to merge Name_Tags Template and we have 10 templates in a single page. We have put a "Next" Merge field after every Merge block. Now suppose if the query returns only 4 records and the page has 10 templates, then how does the aspose behaves. Is that possible that only 4 records are shown and the other 6 records does not comes i.e. the other 6 records which comes as it is like a merge block, instead that nothing will displayed.

Thanks in advance.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your interest in Aspose.Words.

1. I think, in your case, you can try using MailMerge.RemoveEmptyParagraphs option to remove empty paragraphs during mail merge process. See the following link for more information:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.reporting.mailmerge.removeemptyparagraphs.html

2. You can use Mail Merge with regions in this case. Please follow the link to learn more:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/mail-merge-with-regions-explained.html

Please let me know if you need more assistance, I will be glad to help you.

Best regards.