If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
search for tables w/i a table
I have a big table, and w/i some cells are little tables. I need to search
for each of those little tables. The table browse object won't do it. What I am ultimately trying to do is extract each of the little tables (to modify them separately), tag them with some identifier, leave behind a placeholder, then be able to put them back when I'd done manipulating them. I'd be happy if I could just cycle through all the tables first. -- Alan |
#2
|
|||
|
|||
search for tables w/i a table
Hi,
I would not rely on something recursive, like tables in tables, as long as the limit for the recursiveness is unknown. Sub Test444() Dim oTbl As Table Dim oCll As Cell For Each oTbl In ActiveDocument.Tables For Each oCll In oTbl.Range.Cells If oCll.Tables.Count 0 Then oCll.Tables(1).Select Stop End If Next Next End Sub HTH -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
#3
|
|||
|
|||
search for tables w/i a table
Tables form a hierarchy within a document, so in VBA you can do this:
For Each t In ActiveDocument.Tables(1).Tables t.Select Next You need to have a way of identifying the outer table but then you can do what you want with the inner ones. -- Enjoy, Tony "adgorn" wrote in message ... I have a big table, and w/i some cells are little tables. I need to search for each of those little tables. The table browse object won't do it. What I am ultimately trying to do is extract each of the little tables (to modify them separately), tag them with some identifier, leave behind a placeholder, then be able to put them back when I'd done manipulating them. I'd be happy if I could just cycle through all the tables first. -- Alan |
Thread Tools | |
Display Modes | |
|
|