Repeating table header not working

I am trying to set the first row as repeated header. I followed the guide as well as the link below with no success.

I have 2 tables set up in Word. They are not nested. Second table is where I declare my repeated header.

Aspose Words Repeating table header issue

Hi Mark,

Thanks for your inquiry. Please try using the following sample code:

Document doc = new Document(MyDir + @"FacilityInvoice4.docx");

Table tab = (Table)doc.GetChildNodes(NodeType.Table, true)[1];
tab.FirstRow.RowFormat.HeadingFormat = true;
tab.TextWrapping = TextWrapping.None;

Row row = (Row)tab.Rows[2].Clone(true);

for (int i = 1; i < 50; i++)
    tab.InsertAfter((Row)row.Clone(true), tab.FirstRow);

doc.Save(MyDir + @"15.12.0.docx");

Hope, this helps.

Best regards,