0

I have developed a WinForms application which utilises the DocX Library for editing .docx files in memory

I have several samples with data. I would like to print each sample in separate page.

I am inserting three tables in one table using the code like this.

Table t6 = document.AddTable(1, 3);
t6.Rows[0].Cells[0].InsertTable(table2).InsertParagraphAfterSelf("");
t6.Rows[0].Cells[1].InsertTable(table4).InsertParagraphAfterSelf("");
t6.Rows[0].Cells[2].InsertTable(table5).InsertParagraphAfterSelf("");
document.InsertTable(t6);

For the first sample it was ok but from the next sample i am getting first sample plus second sample. it is same with third.....i am getting all previous samples in the next.

How to remove previous sample in the next sample. I have tried using table remove and clear but didn't worked.

  t6.Rows[0].Cells[0].Tables.First().Remove();
  t6.Rows[0].Cells[0].Pictures.First().Remove();

Any suggestions?

verendra
  • 223
  • 3
  • 18

0 Answers0