Borders showing up when I don't want them (multiple tables)

I have 1 merge field in a doc file.

I use insertHTML to insert a table for ex.

<table border=1><tr>....</table>

then in the same merfield a second table but BORDER=0

The problem is that I still see the border in the second table.

After upgrading to 3.5 it has removed the inside borders, but the outside borders remain. I notice that if I view the code of the .doc file it has border=1 at the table level, even though I said border=0 explicitly.

Please help. Thanks.

Thanks for reporting. The problem was logged to our defect base as Issue #776. We will try to correct this problem in the next hotfix.

Meanwhile, you can use the following code as a temporary workaround:

builder.InsertHtml(@"<table border=1><tr>....</table>");

// set all borders of the previously inserted table to none
foreach (Row row in ((Table)builder.CurrentParagraph.PreviousSibling).Rows)
{
    foreach (Border border in row.RowFormat.Borders)
    {
        border.LineStyle = LineStyle.None;
    }
}

Fixed in Aspose.Words 3.5.2:
https://downloads.aspose.com/words/net