First of all let me confirm...
You have one table - Table(1) - which has 10 tables nested inside it.
Yes?
Let me ask if you know the answer to this question. How many tables does the
document have?
Hopefully, you answer...one. the document has ONE table.
Try this:
MsgBox ActiveDocument.Tables.Count
It returns 1. The document has ONE table. The table has...10 tables.
However, even doing a count of the tables IN a table does not give a good
answer.
MsgBox ActiveDocument.Tables(1).Range.Tables.Count
will still give 1.
You can get the RowIndex of the Selection with:
If Selection.Information(wdWithInTable) = True Then
MsgBox Selection.Cells(1).RowIndex
End If
BUT, if the selection is in Row 1 of the table in - say Row 3 of table 1 - it
will return...1. If it is Row 2 of the table in Row 5 of Table 1, it will
return...2. It returns the RowIndex of the table it is IN.
"So, if a user is somewhere in table4, they would be in row3 of table1."
Maybe so, but to VBA they are NOT. They are in whatever row of table 4.
Let me repeat that: from a table perspective, they are NOT in table 1, they
are in table 4.
Why do you need to know what row of table 1 they seem to be in? What are you
trying to do?
I have a table (table1) with 10 rows, 1 column.
Inside each row I have a nested table (table2 - table11).
[quoted text clipped - 4 lines]
Thanks for any help,
KevinWarner