Class Column (Word VBA)

The class Column represents a single table column. The Column object is a member of the Columns collection. The Columns collection includes all the columns in a table, selection, or range.

Class Cell gives access to class Column.


Dim clm as Column
Set clm = ActiveDocument.Range.Columns(Index:=1)

For Each

Here is an example of processing the Column items in a collection.


Dim clm As Column
For Each clm In ActiveDocument.Range.Columns
	
Next clm

Methods

AutoFit - Changes the width of a table column to accommodate the width of the text without changing the way text wraps in the cells.

Delete - Deletes the specified column.

Select - Selects the specified table column.

SetWidth - Sets the width of a column in a table.

Sort - Sorts the specified table column.

Properties

Borders returns a Borders collection that represents all the borders for the specified object.

Cells returns a Cells collection that represents the table cells in a table column.

Index returns a Long that represents the position of an item in a collection.

IsFirst true if the specified column or row is the first one in the table.

IsLast true if the specified column or row is the last one in the table.

NestingLevel returns the nesting level of the specified column.

Next returns the next column in a collection of table columns.

PreferredWidth returns or sets the preferred width (in points or as a percentage of the window width) for the specified column.

PreferredWidthType returns or sets the preferred unit of measurement to use for the width of the specified table column.

Previous returns the previous column in a collection of table columns.

Shading returns a Shading object that refers to the shading formatting for the specified column.

Width returns or sets the width of the specified column, in points.

Borders - A collection of Border objects that represent the borders of an object.

Cells - A collection of Cell objects in a table column, table row, selection, or range.

Shading - Contains shading attributes for an object.