Hi there!
Suppose you have a document with 5 tables.
#0 and #1 are “normal” tables, i.e. there are no nested tables inside those two.
#2 has table #3 as a nested table and #4 is a “normal” table again.
When using documentBuilder.moveToCell the first parameter is the TableIndex. How to I get the Index of the correct table?
At the moment I find the correct table by utilising a bookmark with the “Name” of the table in the first row/first column of the table.
With this I use the command tableIndex = oCurrentSection.Body.Tables.IndexOf(oTable) to get the index of the table.
With #0,#1 and #2 this is OK but from then on, this approach does not work because table #3 is obviously not a member of the collection of Tables of the Body and therefore can’t be found and table #4 reports an TabIndex of 3 as if #4 where not there at all. How to I find out the correct TableIndex?
I’m using VB6 with COM-Interop
Best Regards,
Michael