Range.Cells Property

Word Developer Reference

Returns a Cells collection that represents the table cells in a range. Read-only.

Syntax

expression.Cells

expression   A variable that represents a Range object.

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example creates a 3x3 table and assigns a sequential cell number to each cell in the table.

Visual Basic for Applications
  Set newDoc = Documents.Add 
Set myTable = newDoc.Tables.Add(Selection.Range, 3, 3)
i = 1
For Each c In myTable.Range.Cells
    c.Range.InsertAfter "Cell " & i
    i = i + 1
Next c

See Also