Column Property
Applies To
Bookmark object, Cell object.
Description
Bookmark object: True if the specified bookmark is a table column. Read-only Boolean.
Cell object: Returns a Column object that represents the table column containing the specified cell. Read-only.
See Also
Cell method, Columns property, Row property.
Example
This example creates a table with a bookmark and then displays a message box that confirms that the bookmark is a table column.
Set newDoc = Documents.Add
Set myTable = newDoc.Tables.Add(Selection.Range, 3, 5)
Set myCellRange = myTable.Cell(3,5).Range
myCellRange.InsertAfter "Cell(3,5)"
newDoc.Bookmarks.Add Name:="BKMK_Cell35", Range:=myCellRange
MsgBox newDoc.Bookmarks(1).Column
This example creates a 3x5 table and applies shading to the even-numbered columns.
Selection.Collapse Direction:=wdCollapseStart
Set myTable = ActiveDocument.Tables.Add(Range:=Selection.Range, _
NumRows:=3, NumColumns:=5)
For Each aCell In myTable.Rows(1).Cells
If aCell.ColumnIndex Mod 2 = 0 Then
aCell.Column.Shading.Texture = wdTexture10Percent
End If
Next aCell