Hello, I have a bulletin board like page where I try to export a thread into word using MailMerge. I’m trying to do this with regions and since a thread don’t have comments/replies from start I try to do remove the empty lines.
A thread can have 0 or more comments and the comments can have 0 or more replies. This works as long as the thread has at least one comment and 1 reply. The rest of the comments can have empty replies. If a use a template without replies there has to be at least 1 comment.
The XML structure looks like this:
- Thread
– Comments
— Comment
---- Replies
----- Reply
Before the merge I set MailMerge.RemoveEmptyRegions = true;
The only solution I can think of is using 3 templates.
- One template when there are comments with replies
- One template when there are no comments with replies
- One template when there are no comments
Are there no other solution? I know how to remove unused MergeFields but I want to remove the whole table row from my template since it has background color.
This message was posted using Page2Forum from How-to: Use Nested Mail Merge Regions - Aspose.Words for .NET