TableStyle.ColumnStripe 属性 (Word)

返回或设置一个 Long ,代表的条纹,当样式指定奇数或偶数列成的列数。 读/写。

语法

expressionColumnStripe

表达 一个代表“TableStyle”对象的变量。

备注

使用 条件 方法设置奇数或偶数列条纹表样式。

示例

本示例新建一个表格样式并设置其格式,然后将新样式应用于新的表格。 该样式的结果使每隔三列的三列和每隔两行的两行具有 20% 的底纹。

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 
 .ColumnStripe = 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

另请参阅

TableStyle 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。