Selecting Nested Tables

R

RPMitchal

Word 2003

My apologies if I have duplicated this posting. I seem to be having
problems with getting it posted.

In the case of nested tables, is there a process by which one can select a
nested table for modification, separation and/or deletion?

Much thanks in advance - Rod
 
J

Jay Freedman

Word 2003

My apologies if I have duplicated this posting. I seem to be having
problems with getting it posted.

In the case of nested tables, is there a process by which one can select a
nested table for modification, separation and/or deletion?

Much thanks in advance - Rod

Assuming you know or can determine which cell of the outer table contains a
nested table, you can do something like this:

ActiveDocument.Tables(1).Cell(1,1).Tables(1).Select

It selects the nested table in the top left cell of the outer table. If that
second-level table contains a third-level nested table in the top cell of the
second column, you can get that one by

ActiveDocument.Tables(1).Cell(1,1).Tables(1).Cell(1,2).Tables(1).Select

Also, remember that it often isn't necessary to select something in order to do
something with it. For example, if you want to delete the nested table, don't
select it; just do

ActiveDocument.Tables(1).Cell(1,1).Tables(1).Delete

If you need to determine how deeply nested a particular table is, you can look
at its .NestingLevel property. Look it up in the Help.
 
J

Jay Freedman

Word 2003

My apologies if I have duplicated this posting. I seem to be having
problems with getting it posted.

In the case of nested tables, is there a process by which one can select a
nested table for modification, separation and/or deletion?

Much thanks in advance - Rod

Sorry, my previous reply assumed you were asking about a macro -- I just had
macros on my mind.

In the user interface, you can click the small square (containing a 4-way arrow)
that appears above and to the left of the nested table when the cursor is in
that table.
 
R

RPMitchal

Hello Jay:

You are right – I was not expecting a macro from you as a solution for my
situation. However, I want to let you know just how much I appreciate you
taking the time to send along the coding that you supplied.

It seems that implementing and dissecting the coding that I receive from you
and your fellow Community Gurus has been the best way for me to gain any
insight into the workings and applications of VBA.

Thanks Again – Rod
 

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