MS Word 2007 Template: Create dynamic table with user define number of rows.
Hey guys,
So I am working on MS Word template that I want to use for company reports. The structure of the template as a whole is the same from report to report, with just some parts that need changed (dates, lot numbers, identification numbers etc.).
Well first 'fill-in' field in the template is entering the number of lots I am reporting. But the next section includes a table where I enter the identification numbers for each lot. The number of lots changes from report to report, so this is what I would like.
When I open a new document I would like to:
* first input the number of lots.
* Then I would like the document to create a table with the number of rows equal to the number of lots. (the columns and headers will be fixed)
* then insert fill-in fields into some of the cells, and drop-downs into other cells
So far I have created a macro to create the table, but I can't seem to reference the lot number value (numLots) to change the number of rows (numRows).
Any help would be greatly appreciated.
|