Interior.PatternColorIndex 屬性 (Word)
會傳回或設定內景圖樣的色彩為目前調色盤中、 索引或下列 其中一個 XlColorIndex 常數之一: xlColorIndexAutomatic 或 xlcolorindexnone: 一起 。 讀取/寫入的 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
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應