Add row to a table

J

Jay Freedman

Barth Wilsey said:
Please provide me with the code to add a new row to a table

If the cursor is in the table you want to add to, use

Selection.Tables(1).Rows.Add

If the cursor is elsewhere, but you know the index of the table (that
is, whether this is the first table in the document, the second,
etc.), you can do something like

ActiveDocument.Tables(2).Rows.Add
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top