Share via


ChartFillFormat.Patterned Method

Sets or returns a value that represents the pattern applied to the specified fill. Read-only.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Sub Patterned ( _
    Pattern As MsoPatternType _
)
'Usage
Dim instance As ChartFillFormat
Dim Pattern As MsoPatternType

instance.Patterned(Pattern)
void Patterned(
    MsoPatternType Pattern
)

Parameters

Remarks

Use the BackColor and ForeColor properties to set the colors used in the pattern.

Examples

This example adds a rectangle to myDocument and sets its fill pattern to match that of the shape named "rect1." The new rectangle has the same pattern as rect1, but not necessarily the same colors. The colors used in the pattern are set with the BackColor and ForeColor properties.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    pattern1 = .Item("rect1").Fill.PatternWith .AddShape(msoShapeRectangle, 100, 100, 120, 80).Fill

        .ForeColor.RGB = RGB(128, 0, 0)

        .BackColor.RGB = RGB(0, 0, 255)

        .Patterned pattern1

    End With

End With

See Also

Reference

ChartFillFormat Interface

ChartFillFormat Members

Microsoft.Office.Interop.PowerPoint Namespace