Cells (collection)

<< Click to Display Table of Contents >>

Cells (collection)

Access paths:

Application à Documents à Item à Tables à Item à Rows à Item à Cells

Application à ActiveDocument à Tables à Item à Rows à Item à Cells

 1  Description

Cells is a collection of all table cells in an individual table row. The individual elements of this collection are of the type Cell.

 2  Access to the collection

Each row of a table has exactly one instance of the Cells collection. It is accessed through the object pointer Cells of the table row:

' Display the number of cells in the secondnd row of the first table

MsgBox tm.ActiveDocument.Tables(1).Rows(2).Cells.Count

 3  Properties, objects, collections and methods

Properties:

Count R/O

 

Objects:

Item Cell (default object)

Application Application

Parent Row

Count (property, R/O)

Data type: Long

Returns the number of Cell objects in the table row – in other words: the number of cells in the table row.

Item (pointer to object)

Data type: Object

Returns an individual Cell object, i.e. an individual table cell.

Which Cell object you get depends on the numeric value that you pass to Item: 1 for the first cell in the table row, 2 for the second, etc.

Application (pointer to object)

Data type: Object

Returns the Application object.

Parent (pointer to object)

Data type: Object

Returns the parent object, i.e. an object of the type Table.