InsertColumns Method

Applies To

Selection object.

Description

Inserts columns to the left of the column that contains the selection. If the selection isn't in a table, an error occurs.

Note The number of columns inserted is equal to the number of columns selected. You can also insert columns by using the Add method of the Columns object.

Syntax

expression.InsertColumns

expression   An expression that returns a Selection object.

See Also

AutoFit method, InsertCells method, InsertRows method.

Example

This example inserts new columns to the left of the column that contains the selection. The number of columns inserted is equal to the number of columns selected.

If Selection.Information(wdWithInTable) = True Then
    With Selection
        .InsertColumns
        .Shading.Texture = wdTexture10Percent
    End With
End If