Share via


TableStyle.ColumnStripe Property

Word Developer Reference

Returns or sets a Long that represents the number of columns in the banding when a style specifies odd- or even-column banding. Read/write.

Syntax

expression.ColumnStripe

expression   A variable that represents a TableStyle object.

Remarks

Use the Condition method to set odd- or even-column banding for a table style.

Example

This example creates and formats a new table style then applies the new style to a new table. The resulting style causes three columns every third column and two rows every second row to have 20% shading.

Visual Basic for Applications
  Sub NewTableStyle()
    Dim styTable As Style
With ActiveDocument
    Set styTable = .Styles.Add(Name:="TableStyle 1", _
        Type:=wdStyleTypeTable)

    With .Styles("TableStyle 1").Table
        .Condition(wdEvenColumnBanding).Shading _
            .Texture = wdTexture20Percent
        .<strong class="bterm">ColumnStripe</strong> = 3
        .Condition(wdEvenRowBanding).Shading _
            .Texture = wdTexture20Percent
        .RowStripe = 2
    End With

    With .Tables.Add(Range:=Selection.Range, NumRows:=15, _
            NumColumns:=15)
        .Style = ActiveDocument.Styles("TableStyle 1")
    End With
End With

End Sub

See Also