You used macro recorder in Word to generate code then pasted that code to a procedure in Access? Macro can help to generate code syntax but will usually have to be modified. Post the entire procedure for analysis. Something like:
Code:
Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oTbl As Word.Table
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add
Set oTbl = oDoc.Tables.Add(oDoc.Range(0, 0), 4, 3, wdWord9TableBehavior, wdAutoFitFixed)
With oTbl
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = False
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = False
.ApplyStyleRowBands = True
.ApplyStyleColumnBands = False
.Cell(1, 1).Range.Text = "abc"
.Cell(1, 2).Range.Text = "def"
.Cell(1, 3).Range.Text = "ghi"
End With
Review https://msdn.microsoft.com/en-us/lib.../ff845710.aspx
Consider using a Word template document instead.