Thanks fwang for your quick reply. I changed my code to your prototype, but am still having the same problem. The table goes row-by-row as expected until it fills the first page, then it jumps to page 2 and continues until the entire page is filled with a table. The last rows are now invisible and there is a blank page 3. I've included a more complete code sample. Thanks again for your help. BTW am using Word 2003 SP2.
Dim MyRs As Recordset
Dim WordObj As Word.Application
Dim WordDoc As Word.Document
Dim i As Integer, iCellCount As Integer
Set MyRs = CurrentDb.OpenRecordset("qryClients")
MyRs.MoveFirst
Set WordObj = CreateObject("Word.Application")
WordObj.Visible = True
Set WordDoc = WordObj.Documents.Add("C:\Clients.dot")
iTables = WordDoc.Tables.Count
If iTables > 0 Then
With WordDoc.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With
iCellCount = WordDoc.Tables(1).Rows(1).Cells.Count
End If
With WordObj.Application
.ActiveDocument.Tables(1).Select
Do While Not MyRs.EOF
For i = 1 To iCellCount
.Selection.TypeText Text:=Nz(MyRs(Field(i)), "")
.Selection.MoveRight Unit:=wdCell
Next i
MyRs.MoveNext
Loop
End With
WordDoc.SaveAs "C:\Clients.Doc"
MyRs.Close
WordObj.Quit
Set WordObj = Nothing