Interior.PatternColorIndex 属性 (Word)

返回或设置内部图案的颜色,作为当前调色板中的索引也可以是下面的 XlColorIndex 常量之一: xlColorIndexAutomaticxlColorIndexNone 。 读/写 Long

语法

表达式PatternColorIndex

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

备注

此属性设置为 xlColorIndexAutomatic ,以指定图形对象的自动填充样式。 将本属性设置为 xlColorIndexNone,则指定不希望使用图案(等价于将 Interior 对象的 Pattern 属性设置为 xlPatternNone)。

示例

以下示例为活动文档中第一个图表的第一个图表组启用涨/跌柱线,然后向跌柱线添加交叉图案并将图案颜色设置为红色。

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart.ChartGroups(1) 
 .HasUpDownBars = True 
 .DownBars.Interior.Pattern = xlPatternCrissCross 
 .DownBars.Interior.PatternColorIndex = 3 
 End With 
 End If 
End With

另请参阅

Interior 对象

支持和反馈

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