Previous Document Next Document

Object Model Reference : Classes : P : PatternFill : Properties : PatternFill.Type


PatternFill.Type

Property Type As cdrPatternFillType

Description

Member of PatternFill

The Type property returns or specifies the type of pattern fill (two-color bitmap, full-color bitmap, or vector).

The Type property returns a value of cdrPatternFillType.

VBA example

The following VBA example changes all colors in two-color pattern fills to grayscale.

Sub Test()
 Dim s As Shape
 Dim pf As PatternFill
 For Each s In ActivePage.Shapes
  If s.Fill.Type = cdrPatternFill Then
   Set pf = s.Fill.Pattern
   If pf.Type = cdrTwoColorPattern Then
    pf.BackColor.ConvertToGray
    pf.FrontColor.ConvertToGray
   End If
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.