In writing data from Access 2003 to a Word 2003 table using Automation, the Word table doesn’t continue from page to page as it does automatically when manually inserting new rows. It merely grows to the size of one page, including header and footer and then stops taking data. Here’s the code I’m using to add rows to the table as I write data to it.
Set WordObj = CreateObject(“Word.Application”)
Set WordDoc = WordObj.Documents.Open(“C:\TestDoc.dot”)
.
.
lRow = lRow + 1
.
.
If WordDoc.Tables(1).Rows.Count < lRow Then
WordDoc.Tables(1).Rows.Add
End If
Thanks for your help.