please find attached the template and the template we would create.
Just to clarify, we are trying not to have to force the template editor to understand the structure of the tablestart /end tags in the document. They may put other sub tables within here and we use mergeregions always. This works perfectly if the document does not contain sections, and we use code like this:
builder.InsertField(@“MERGEFIELD TableStart:Letter *MERGEFORMAT”);
builder.InsertField(@“MERGEFIELD TableEnd:Letter *MERGEFORMAT”);
but, if there are sections we get a message like:
Mail merge region Letter is badly formed. TableStart and TableEnd should be in the same section, same table row or same table cell.
so I was programmatically hoping to use the documentBuilder to update the template before merging to add in these default root merge table starts and ends.