Word VBA Resize Table Columns and Rows
In this article I will explain how you can use VBA for word to resize table columns and rows.
Every word document has a Tables collection The first step in working with a table in VBA for word is to determine the table index. Tables in a word document start from the index “1” and go up. So for example the first table would be referenced by using the statement below:
The second table would be reference by using:
and so on . . .
All examples in this article will use the table below as their initial table:
Modify Row Height:
The code below will change the height of the first row of the first table to 50 points:
Modify Column Width:
The code below will change the width of the first column to 20 points: