View Single Post
  #1  
Old March 1st, 2010, 08:35 AM posted to microsoft.public.word.tables
TimvG
external usenet poster
 
Posts: 12
Default Are there limits to Nesting? Here's one...

What limits are there to nesting tables in Word? And what problems
are encountered as you nest deeply?

I'm developing an "application" that involves lots of tables within
tables within tables within.... In general I'm really impressed with
how well Word handles deeply nested table structures. Of course,
performance does suffer as nesting gets deeper. But I haven't found
any "hard" limit to how many levels of nesting you can have.

One problem I *have* encountered is this: apparently, you can't set
the font as hidden/unhidden when there are ten or more nested tables.
To explain: In my application, it is often useful to hide the
"children" (nested tables) of a table. A very handy trick for doing
this is to simply set the font of the nested tables to hidden; e.g.:

Selection.Cells(1).Tables(1).Range.Font.Hidden = True

However, if you try this when Tables(1) itself contains 9 or more
tables, then you get an error. If you ask Word to tell you the
"hidden" status of the topmost nested table

msgbox Selection.Cells(1).Tables(1).Range.Font.Hidden it returns
"9999999" - i.e. apparently it just can't calculate the status.

I'm interested whether anyone else

(a) has encountered the same problem, or perhaps has a fix/workaround

(b) more generally, knows of any other limits to nesting, or problems
you encounter when doing lots of nesting.