I'll try the code in a little while, but the answer to your last question is that we have a large, existing report template (200+ pages) and some extensive analysis programs that produce a lot of statistical output. Last year, we manually cut and pasted the data into the report which was very labor intensive. This year, I'm trying to automate the process by outputting the data from the statistical programs into a simple, pipe-delimited file (see sample below) and then read this file in VBA and put the data directly into Word tables in the report template. We want each cell to have an ID # so that in case a new row gets inserted into a table in the future, none of the existing cell references would have to be changed.
Code:
TABLE 3.3.6.1.1 | cell_ID[2,3] | 50
TABLE 3.3.6.1.1 | cell_ID[2,4] | 102503.04
TABLE 3.3.6.1.1 | cell_ID[2,5] | 48.78 (36.2, 64.31)
TABLE 3.3.6.1.1 | cell_ID[2,5] | 49.37 (36.59, 65.17)
TABLE 3.3.6.1.1 | cell_ID[3,3] | 9
TABLE 3.3.6.1.1 | cell_ID[3,4] | 9623.88
TABLE 3.3.6.1.1 | cell_ID[3,5] | 93.52 (42.76, 177.53)
TABLE 3.3.6.1.1 | cell_ID[3,5] | 91.76 (41.61, 175.16)
TABLE 3.3.6.1.1 | cell_ID[4,3] | 0
TABLE 3.3.6.1.1 | cell_ID[4,4] | 67.81
TABLE 3.3.6.1.1 | cell_ID[4,5] | 0 (0, 5439.72)
TABLE 3.3.6.1.1 | cell_ID[4,5] | 0 (0, 5439.72)
TABLE 3.3.6.1.1 | cell_ID[5,3] | 0
TABLE 3.3.6.1.1 | cell_ID[5,4] | 185.13
TABLE 3.3.6.1.1 | cell_ID[5,5] | 0 (0, 1992.55)
TABLE 3.3.6.1.1 | cell_ID[5,5] | 0 (0, 1992.55)
TABLE 3.3.6.1.1 | cell_ID[6,3] | 0
TABLE 3.3.6.1.1 | cell_ID[6,4] | 12.10
TABLE 3.3.6.1.1 | cell_ID[6,5] | 0 (0, 30469.54)
TABLE 3.3.6.1.1 | cell_ID[6,5] | 0 (0, 30469.54)
TABLE 3.3.6.1.1 | cell_ID[7,3] | 94
TABLE 3.3.6.1.1 | cell_ID[7,4] | 232977.36
TABLE 3.3.6.1.1 | cell_ID[7,5] | 40.35 (32.6, 49.37)
TABLE 3.3.6.1.1 | cell_ID[7,5] | 41.36 (32.72, 51.59)