Class Interior (Word VBA)

The class Interior represents the interior of an object.

Set

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

Interior class variables can be set using the UpBars.Interior procedure.

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 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

Parent

Returns the parent for the specified object. Read-only object.

Dim objParent As Object
Set objParent = ActiveDocument.Background.Chart.ChartGroups(1).UpBars.Interior.Parent

Pattern

Returns or sets a Variant value, containing an XlPattern constant, that represents the interior pattern.

Possible Values are xlPatternAutomatic - Word controls the pattern, xlPatternChecker - A checkerboard, xlPatternCrissCross - Criss-crossed lines, xlPatternDown - Dark diagonal lines running from the upper-left to the lower-right, xlPatternGray16 - 16% gray, xlPatternGray25 - 25% gray, xlPatternGray50 - 50% gray, xlPatternGray75 - 75% gray, xlPatternGray8 - 8% gray, xlPatternGrid - A grid, xlPatternHorizontal - Dark horizontal lines, xlPatternLightDown - Light diagonal lines running from the upper-left to the lower-right, xlPatternLightHorizontal - Light horizontal lines, xlPatternLightUp - Light diagonal lines running from the lower-left to the upper-right, xlPatternLightVertical - Light vertical bars, xlPatternLinearGradient - A linear gradient, xlPatternNone - No pattern, xlPatternRectangularGradient - A rectangular gradient, xlPatternSemiGray75 - 75% dark moiré, xlPatternSolid - A solid color, xlPatternUp - Dark diagonal lines running from the lower-left to the upper-right, xlPatternVertical - Dark vertical bars.
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 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