21.4. Working with Tables

Many people need to work with tables in their Word documents, either creating them from scratch or manipulating existing tables. VBA uses the Table object to represent a table, and the Table objects are gathered together into the Tables collection. To work with tables, you use the Tables property to return the Tables collection for the Document, Range, or Selection object in question.

The Tables collection and the Table object contain the following collections and objects:

  • The Rows collection contains the rows in the table. Each row is represented by a Row object.

  • The Columns collection contains the columns in the table. Each column is represented by a Column object.

  • The Cell object provides access to a specified cell ...

Get Mastering VBA for Microsoft Office 2007, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.