Range.Cells Property (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .Cells

expression A variable that represents a Range object.

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

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

Concepts

Other resources

Show: