Cell.Column property (Word)

Returns a Column object that represents the table column containing the specified cell. Read-only.

Syntax

expression.Column

expression Required. A variable that represents a 'Cell' object.

Example

This example creates a 3x5 table and applies shading to the even-numbered columns.

Dim tableNew As Table 
Dim cellLoop As Cell 
 
Selection.Collapse Direction:=wdCollapseStart 
Set tableNew = _ 
 ActiveDocument.Tables.Add(Range:=Selection.Range, _ 
 NumRows:=3, NumColumns:=5) 
 
For Each cellLoop In tableNew.Rows(1).Cells 
 If cellLoop.ColumnIndex Mod 2 = 0 Then 
 cellLoop.Column.Shading.Texture = wdTexture10Percent 
 End If 
Next cellLoop

See also

Cell Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.