Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.08 KB

Word.Selection.Cells.md

File metadata and controls

50 lines (30 loc) · 1.08 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Selection.Cells property (Word)
vbawd10.chm158662713
vbawd10.chm158662713
Word.Selection.Cells
4b808b86-42ba-ccb4-b19a-87b134df3b79
06/08/2017
medium

Selection.Cells property (Word)

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

Syntax

expression.Cells

expression A variable that represents a Selection object.

Remarks

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

Example

This example sets the current cell's background color to red.

If Selection.Information(wdWithInTable) = True Then 
 Selection.Cells(1).Shading.BackgroundPatternColorIndex = wdRed 
Else 
 MsgBox "The insertion point is not in a table." 
End If

See also

Selection Object

[!includeSupport and feedback]