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 支援與意見反應