![]() |
#1
|
|||
|
|||
![]() Not me. Even the simplest task fails for me. The attached has no nested tables yes VBA reports it has one. Code:
Option Explicit Sub CountFirstLevelNestedRows() Dim tbl As Table Dim rw As row Dim c As cell Dim nestedCount As Long Dim nt As Table nestedCount = 0 ' Loop through all tables in the document For Each tbl In ActiveDocument.Tables ' Check each row for nested tables For Each rw In tbl.Rows For Each c In rw.Cells ' If this cell contains nested tables (first-level) If c.Range.Tables.count > 0 Then MsgBox "Nested table !" End If Next c Next rw Next tbl End Sub ![]() Any help appreciated before I spend more time up what looks like a garden path... Thanks. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
JingleBelle | Word VBA | 6 | 11-13-2020 07:36 AM |
Formatting Nested Tables | LBruce | Word VBA | 3 | 01-20-2020 09:07 AM |
Removing KeepWithNext Formatting from Nested Tables? | Jfedora | Word VBA | 3 | 06-06-2017 11:49 AM |
Nested tables. Count rows | NevilleT | Word VBA | 9 | 05-10-2017 05:22 AM |
Nested vlookup with varable tables! | Dave Jones | Excel | 0 | 08-30-2012 09:15 AM |