Merge cells based on condition

Hi!
I am trying to get the following result:
I have a table with 2 rows and 4 cols. First row is for headers. In the second row, I put a tablestart in the first cell of the second row, followed by the field to display in col 1. I’ve put other fields in cells 2,3 and 4 to finally end wit tableend field in cell 4.
Everything works fine and every row is displayed. What I’m trying to do now is to have different row format base on a condition ({IF “condition” = “result” “x” “y”}):
If condition is met, i would like to display the row with all cell merged to have only one cell.
Final result would look like this:
----------------------------------------------------------------
[First time condition is met]
Col1 | Col2 | Col3 | Col4
Col1 | Col2 | Col3 | Col4
[Second time condition is met]
Col1 | Col2 | Col3 | Col4
Etc.
-------------------------------------------------------------------
Where cells in [first time condition is met] and in [second time condition is met] are merged so the text will be displayed on the entire line.
Can you see how to do something like this? Note that my dataset has only one datatable.
Regards,
JSr

Hi,

Thanks for your inquiry. In your case, I suggest you to use MailMerge.FieldMergingCallback for your requirement. MailMerge.FieldMergingCallback occurs during mail merge when a mail merge field is encountered in the document.

Please read following documentation link for your kind reference.
https://docs.aspose.com/words/net/types-of-mail-merge-operations/

Hope this answers your query. Please let us know if you have any more queries.