Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oTable As Word.Table
Dim x As Integer
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add
Set rs = New ADODB.Recordset
With rs
.Open "SELECT * FROM ClientTable", cn, 2, 3
Dim r As Integer, c As Integer
Set oTable = oDoc.Tables.Add(oDoc.Bookmarks("\endofdoc").Range, rs.RecordCount, 5)
oTable.Range.ParagraphFormat.SpaceAfter = 6
'For r = 1 To rs.RecordCount
Do While Not .EOF
For c = 1 To 5
oTable.Cell(r, c).Range.Text = rs(x).Value
x = x + 1
Next
.MoveNext
Loop
'Next
oTable.Rows(1).Range.Font.Bold = True
End With
Unload Me
It only displays the first row, and the font is not bold. Please help.