-1

I have a word template (.dotx) that contains two tables.

for (int j = 0; j < 2; j++)
{        
    Range range = tables[3].Range;
    range.Copy();
    Range rng = tables[3].Range;
    rng.SetRange(tables[4 + i].Range.End + 2, tables[4 + i].Range.End + 2);
    rng.Paste();
    i++;

    Range rangeTestSteps = tables[4].Range;
    rangeTestSteps.Copy();
    Range rngTestSteps = tables[4].Range;
    rngTestSteps.SetRange(tables[4 + i].Range.End + 2, 
                          tables[4 + i].Range.End + 2);
    rngTestSteps.Paste();
    i++;
}

I am able to create table dynamically but the prob is i have to add Table of contents after every two table.Please help me.@ plutext

razlebe
  • 7,134
  • 6
  • 42
  • 57
suneel
  • 1
  • 2

1 Answers1

0

You could try the approach around custom xml data binding outlined at OpenDope.org

You'd need to write the C# code to process it though, since that hasn't been done yet.

There is also Flexdoc, though I don't recall whether it will help you if you have variable number of rows in your tables.

JasonPlutext
  • 15,352
  • 4
  • 44
  • 84