R
Rhino
I'm trying to figure out how to create an asymmetrical table with a macro in
Word 2002.
The table needs exactly two rows in it: on the first row, there are 4
equal-sized cells (I'll actually need to resive them a bit but equal-sized
will do for now); on the second row, there is a single cell that uses the
full width of the table. The table itself will be the full width of the page
less the left and right margins. I'm putting 4 small facts in the first row
and a paragraph in the second row.
I've figured out two ways to do it in Word via the GUI:
1. Use Draw Table to create a new table; draw a horizontal line to tell Word
that I want two rows; draw dividers on the first row to create 4 cells in
that row.
2. Use Insert/Table to create a new table of 4 columns and 2 rows. Then,
select the 4 cells in the second row, click on the boxed plus sign that
appears above and left of the top, leftmost cell of the table, right-click
to get a context, then select Merge Cells.
Unfortunately, neither approach can be recorded in the macro recorder. I've
managed to record the first half of the second approach, namely the creation
of the table with 4 columns and 2 rows, but I can't record the process to
merge the cells and haven't any idea how to do it with a VBA macro. After
creating a table with the second approach, the first approach doesn't work
at all: Draw Table is greyed out and I can't figure out how to ungrey it.
Can anyone tell me how a macro would accomplish the creation of the table
entirely with VBA statements? For bonus points, can you explain how to make
Draw Table possible again? Mind you, if I can't record the Draw Table
process, I don't care that much ;-)
Word 2002.
The table needs exactly two rows in it: on the first row, there are 4
equal-sized cells (I'll actually need to resive them a bit but equal-sized
will do for now); on the second row, there is a single cell that uses the
full width of the table. The table itself will be the full width of the page
less the left and right margins. I'm putting 4 small facts in the first row
and a paragraph in the second row.
I've figured out two ways to do it in Word via the GUI:
1. Use Draw Table to create a new table; draw a horizontal line to tell Word
that I want two rows; draw dividers on the first row to create 4 cells in
that row.
2. Use Insert/Table to create a new table of 4 columns and 2 rows. Then,
select the 4 cells in the second row, click on the boxed plus sign that
appears above and left of the top, leftmost cell of the table, right-click
to get a context, then select Merge Cells.
Unfortunately, neither approach can be recorded in the macro recorder. I've
managed to record the first half of the second approach, namely the creation
of the table with 4 columns and 2 rows, but I can't record the process to
merge the cells and haven't any idea how to do it with a VBA macro. After
creating a table with the second approach, the first approach doesn't work
at all: Draw Table is greyed out and I can't figure out how to ungrey it.
Can anyone tell me how a macro would accomplish the creation of the table
entirely with VBA statements? For bonus points, can you explain how to make
Draw Table possible again? Mind you, if I can't record the Draw Table
process, I don't care that much ;-)