Sub InsertTables(objDoc As Word.Document)
Dim objTable As Word.Table
Dim MyRange As Word.Range
Dim t As Integer
Const Count = 5
Set MyRange = objDoc.Range
For t = 1 To 5
Set objTable = objDoc.Tables.Add(MyRange, 3, 4)
Set MyRange = objTable.Range
MyRange.Collapse wdCollapseEnd
MyRange.Move wdCharacter, 1
MyRange.Text = vbCr
MyRange.Collapse wdCollapseEnd
MyRange.Move wdCharacter, 1
Next t
End Sub
|