ChartColorFormat 属性 (Word)ChartColorFormat.RGB property (Word)

返回指定颜色的红-绿-蓝颜色值。Returns the red-green-blue value of the specified color. 只读 LongRead-only Long.

语法Syntax

expressionexpression. RGB

_表达式_一个代表 "ChartColorFormat" 对象的变量。expression A variable that represents a 'ChartColorFormat' object.

示例Example

以下示例为活动文档中第一个图表的第一个图表组启用涨/跌柱线,然后向跌柱线添加十字图案,并将图案颜色设置为图表区的前景填充色。The following example enables up and down bars, then adds a criss-cross pattern to the down bars and sets the pattern color to the chart area foreground fill color, for the first chart group of the first chart in the active document.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart 
 .ChartGroups(1).HasUpDownBars = True 
 .ChartGroups(1).DownBars.Interior.Pattern = xlPatternCrissCross 
 .ChartGroups(1).DownBars.Interior.PatternColor = _ 
 .ChartArea.Fill.ForeColor.RGB 
 End With 
 End If 
End With

另请参阅See also

ChartColorFormat 对象ChartColorFormat Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.