API Documentation > CorelDRAW > 2025-v26 > PatternFill > IVGPatternFill
PatternFill.Type property
Gets or sets the Type
Syntax:
Property Get Type() As cdrPatternFillType
Property Let Type(ByVal Value As cdrPatternFillType)
Remarks:
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.
Examples:
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