Home |
Search |
Today's Posts |
#1
|
|||
|
|||
reference to nested tables
i have created in word a nested table. outside table is 2x2, and in cell (row
2 column 2) i have a nested table which is 3x3. i am having trouble refering to the nested table via vba and make changes. can anyone provide the code whereby, i can make a reference to the nested table and modify cells in the nested table? |
#2
|
|||
|
|||
reference to nested tables
On Tue, 25 Oct 2005 12:21:03 -0700, "k2sarah"
wrote: i have created in word a nested table. outside table is 2x2, and in cell (row 2 column 2) i have a nested table which is 3x3. i am having trouble refering to the nested table via vba and make changes. can anyone provide the code whereby, i can make a reference to the nested table and modify cells in the nested table? This sample shows how to drill down through the structure. Once you see how the parts are related, you can start taking shortcuts instead of explicitly assigning each part along the way. Sub Test() Dim outerTable As Table, innerTable As Table Dim outerCell As Cell, innerCell As Cell Set outerTable = ActiveDocument.Tables(1) Set outerCell = outerTable.Cell(2, 2) Set innerTable = outerCell.Tables(1) Set innerCell = innerTable.Cell(3, 3) innerCell.Range.Text = "Cell(3,3)" End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
footnote reference style different in text to footnote pane versio | Microsoft Word Help | |||
Help with nested tables | Tables | |||
How do I "un-nest" a table from nested tables? | Tables | |||
When joining tables, table sections shift left or right. | Tables |