Hi Paul,
not difficult at all, but lots of tedious coding.
Do you want to put the data in an existing table?
Would that table be large enough?
Or do you want to create a new table and where?
Would that be adjacent to an existing table?
What table style etc...
A simple example for inserting the data from the arrays
at the end of the document and transforming the inserted
data into a table, as Jay suggested.
I didn't bother about coding style or speed,
this is only a code snippet for showing the principle:
selection.wholestory
Selection.Collapse direction:=wdCollapseEnd
Selection.TypeText Text:=vbCr
r.Start = Selection.Start ' a temorary range
' entries in the array = 18, entry(0) is ignored
For l = 1 To 18
Selection.TypeText Text:=col1(l) & vbTab ' array for column 1
Selection.TypeText Text:=col2(l) & vbCr ' array for column 1
Next
r.End = Selection.Start ' remember where inserting started
r.ConvertToTable _
Separator:=wdSeparateByTabs, _
NumColumns:=2, _
NumRows:=18, _
AutoFitBehavior:=wdAutoFitFixed
....
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/