Thread: [Solved] adding rows to word table
View Single Post
 
Old 07-17-2011, 05:22 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi hklein,

Assuming you have your code for starting Word & creating the document in place, you could use code like:
Code:
Dim i As Long, j As Long, k As Long
With Doc.Tables(i)
  For j = 1 To k
    .Rows.Add
  Next
End With
where 'Doc' is the document you're working on, 'i' is the table in the document and 'k' is the number of rows to add.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote