I am filling out a Word template with data that was collected from user input. In particular, a (variable) number of documents is selected, and information about each document fills the row of the table.
I bookmarked several elements in the template and successfully filled in the header information from my macro, but I'm not so sure about the table. I bookmarked the first cell and tried to tab (using Chr (9)), and also tried to pass an array. (In a template, a table has only the first row. Typically, tabbing for the last column creates an additional row.)
I can save the contents of the cell with
Word.Application.ActiveDocument.Tables(1).Cell(3, 1).Range.Text
but can’t write to any cell except the first, where I placed a bookmark.
Can anyone suggest a possible solution to populate the table?
source
share