Partager via


Range.Cells Property (Word)

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.

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

Concepts

Range Object

Range Object Members