Quinn
03-15-2006, 02:33 PM
I have an Excel table with N rows and would like to automatically create a Word document
that has N-1 tables on N-1 pages. The table would be comprised of two columns, the first column is the first row of the Excel worksheet and the second column of the table would be the next row in the Excel sheet. So far I have transposed using Excel, and then tried to loop counting the number of rows. But I am having trouble adding the tables to a single word document, my code instead creates n-1 word documents. I am weak in working with Word objects I guess?
any help would be appreciated...absolute newby
ARRAY1 = Array(Range("A1:V1").Value)
Range("a15:a36").Value = Application.WorksheetFunction.Transpose(ARRAY1)
For X = 1 To 3
Array2 = Array(Range("A1:V1").Offset(X, 0).Value)
Range("B15:B36").Value = Application.WorksheetFunction.Transpose(Array2)
Range(("a15:b36")).Select
then paste the range into a table...
that has N-1 tables on N-1 pages. The table would be comprised of two columns, the first column is the first row of the Excel worksheet and the second column of the table would be the next row in the Excel sheet. So far I have transposed using Excel, and then tried to loop counting the number of rows. But I am having trouble adding the tables to a single word document, my code instead creates n-1 word documents. I am weak in working with Word objects I guess?
any help would be appreciated...absolute newby
ARRAY1 = Array(Range("A1:V1").Value)
Range("a15:a36").Value = Application.WorksheetFunction.Transpose(ARRAY1)
For X = 1 To 3
Array2 = Array(Range("A1:V1").Offset(X, 0).Value)
Range("B15:B36").Value = Application.WorksheetFunction.Transpose(Array2)
Range(("a15:b36")).Select
then paste the range into a table...