Class Interior (Word VBA)
The class Interior represents the interior of an object. To use a Interior class variable it first needs to be instantiated, for example
Dim int as Interior
Set int = ActiveDocument.Background.Chart.ChartGroups(1).UpBars.Interior
Color
Returns or sets the primary color of the object.
ActiveDocument.Background.Chart.ChartGroups(1).UpBars.Interior.Color =
ColorIndex
Returns or sets the color of the interior. Possible return values are xlColorIndexAutomatic - Automatic color, xlColorIndexNone - No color.
The color is specified as an index value into the current color palette, or as one of the following XlColorIndex constants:
ActiveDocument.Background.Chart.ChartGroups(1).UpBars.Interior.ColorIndex =
InvertIfNegative
True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number.
ActiveDocument.Background.Chart.ChartGroups(1).UpBars.Interior.InvertIfNegative = True
Pattern
Returns or sets a Variant value, containing an XlPattern constant, that represents the interior pattern. Here you can find possible values for
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
PatternColor
Returns or sets the color of the interior pattern as an RGB value.
With ActiveDocument.InlineShapes(1)
If .HasChart Then
With .Chart.ChartGroups(1)
.HasUpDownBars = True
.DownBars.Interior.Pattern = xlPatternCrissCross
.DownBars.Interior.PatternColor = RGB(0, 0, 255)
End With
End If
End With
PatternColorIndex
Returns or sets the color of the interior pattern as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long. Possible return values are xlColorIndexAutomatic - Automatic color, xlColorIndexNone - No color.
Set this property to xlColorIndexAutomatic to specify the automatic fill style for drawing objects. Set this property to xlColorIndexNone to specify that you do not want a pattern (this is the same as setting the Pattern property of the Interior object to 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