Tables within tables

K

komentr

I have a table of tables and cannot figure out how to access the information
within the subtables. Any examples would be greatly appreciated.
 
J

Jean-Guy Marcil

komentr was telling us:
komentr nous racontait que :
I have a table of tables and cannot figure out how to access the
information within the subtables. Any examples would be greatly
appreciated.

Here is one way:

Dim tblParent As Table
Dim tblSub As Table
Dim cellTarget As Cell

Set tblParent = ActiveDocument.Tables(1)
With tblParent
Set cellTarget = .Cell(2, 3)
With cellTarget
Set tblSub = .Tables(1)
End With
End With

With tblSub
.Range.Font.Size = 10
.Borders(wdBorderHorizontal) _
.LineStyle = wdLineStyleDashLargeGap
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top