The CreatePatternCanvas method creates an empty PatternCanvas object.
Examples:
The following VBA example creates an empty pattern canvas and copies another pattern to this canvas. A rectangle is filled with this pattern, and then the data of the pattern is changed.
Sub Test()
Dim c As PatternCanvas
Set c = CreatePatternCanvas
c.PutCopy PatternCanvases(29)
With ActiveLayer.CreateRectangle(0, 0, 2, 2)
.Fill.ApplyPatternFill cdrTwoColorPattern
.Fill.Pattern.Canvas = c
c.Data = "%%['$aH,&A5&0C"
End With
End Sub