Hi Kjm,
Please tell me how we could write an array to a word table.
I am able to do it in excel at
http://www.kjmsolutions.com/datasetarray.htm
Is there a comparable way you know in Word?
If I have an array, this is how I'd turn it into a table in a Word document
(the basics):
- Turn the array into a delimited string (using the VB Join function, for
example). The delimiter can be anything you like, just as long as it's a
character in the text. Or, you'd have to put the individual entries into
"quotes" so that it's clear where the character is NOT a delimiter.
- Assign this string to a RANGE in the Word document (rng.Text = s)
- convert the range (containing the delimited string) to a table (the
ConvertToTable method), assigning it to an object variable (Dim tbl as
Word.Table tbl = rng.ConvertToTable('set the params)
- Now use the tbl object variable to apply any required formatting to the
table
-- Cindy