Pattern property as it applies to the LineFormat object.
Sets or returns a value that represents the pattern applied to the specified line. Read/write MsoPatternType.
MsoPatternType can be one of these MsoPatternType constants. |
msoPattern10Percent |
msoPattern20Percent |
msoPattern25Percent |
msoPattern30Percent |
msoPattern40Percent |
msoPattern50Percent |
msoPattern5Percent |
msoPattern60Percent |
msoPattern70Percent |
msoPattern75Percent |
msoPattern80Percent |
msoPattern90Percent |
msoPatternDarkDownwardDiagonal |
msoPatternDarkHorizontal |
msoPatternDarkUpwardDiagonal |
msoPatternDashedDownwardDiagonal |
msoPatternDashedHorizontal |
msoPatternDashedUpwardDiagonal |
msoPatternDashedVertical |
msoPatternDiagonalBrick |
msoPatternDivot |
msoPatternDottedDiamond |
msoPatternDottedGrid |
msoPatternHorizontalBrick |
msoPatternLargeCheckerBoard |
msoPatternLargeConfetti |
msoPatternLargeGrid |
msoPatternLightDownwardDiagonal |
msoPatternLightHorizontal |
msoPatternLightUpwardDiagonal |
msoPatternLightVertical |
msoPatternMixed |
msoPatternNarrowHorizontal |
msoPatternNarrowVertical |
msoPatternOutlinedDiamond |
msoPatternPlaid |
msoPatternShingle |
msoPatternSmallCheckerBoard |
msoPatternSmallConfetti |
msoPatternSmallGrid |
msoPatternSolidDiamond |
msoPatternSphere |
msoPatternTrellis |
msoPatternWave |
msoPatternWeave |
msoPatternWideDownwardDiagonal |
msoPatternWideUpwardDiagonal |
msoPatternZigZag |
msoPatternDarkVertical |
expression.Pattern
expression Required. An expression that returns one of the above objects.
Pattern property as it applies to the FillFormat object.
Sets or returns a value that represents the pattern applied to the specified fill. Use the BackColor and ForeColor properties to set the colors used in the pattern. Read-only MsoPatternType.
MsoPatternType can be one of these MsoPatternType constants. |
msoPattern10Percent |
msoPattern20Percent |
msoPattern25Percent |
msoPattern30Percent |
msoPattern40Percent |
msoPattern50Percent |
msoPattern5Percent |
msoPattern60Percent |
msoPattern70Percent |
msoPattern75Percent |
msoPattern80Percent |
msoPattern90Percent |
msoPatternDarkDownwardDiagonal |
msoPatternDarkHorizontal |
msoPatternDarkUpwardDiagonal |
msoPatternDashedDownwardDiagonal |
msoPatternDashedHorizontal |
msoPatternDashedUpwardDiagonal |
msoPatternDashedVertical |
msoPatternDiagonalBrick |
msoPatternDivot |
msoPatternDottedDiamond |
msoPatternDottedGrid |
msoPatternHorizontalBrick |
msoPatternLargeCheckerBoard |
msoPatternLargeConfetti |
msoPatternLargeGrid |
msoPatternLightDownwardDiagonal |
msoPatternLightHorizontal |
msoPatternLightUpwardDiagonal |
msoPatternLightVertical |
msoPatternMixed |
msoPatternNarrowHorizontal |
msoPatternNarrowVertical |
msoPatternOutlinedDiamond |
msoPatternPlaid |
msoPatternShingle |
msoPatternSmallCheckerBoard |
msoPatternSmallConfetti |
msoPatternSmallGrid |
msoPatternSolidDiamond |
msoPatternSphere |
msoPatternTrellis |
msoPatternWave |
msoPatternWeave |
msoPatternWideDownwardDiagonal |
msoPatternWideUpwardDiagonal |
msoPatternZigZag |
msoPatternDarkVertical |
expression.Pattern
expression Required. An expression that returns one of the above objects.
Example
As it applies to the LineFormat object.
This example adds a patterned line to myDocument
.
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddLine(10, 100, 250, 0).Line
.Weight = 6
.ForeColor.RGB = RGB(0, 0, 255)
.BackColor.RGB = RGB(128, 0, 0)
.Pattern = msoPatternDarkDownwardDiagonal
End With
As it applies to the FillFormat object.
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.Pattern
With .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