Object Model Reference : Classes : T : TextureFill : Methods : TextureFill.Select |
Sub Select(Texture As String, [Library As String])
Member of TextureFill
The Select method replaces a texture fill in a shape with another texture fill.
Parameter
|
Description
|
Texture
|
Specifies the name of the new texture to be applied
|
Library
|
Specifies the name of the texture library to which the new texture belongs. This parameter is optional.
|
The following VBA example loops though all shapes on a page and searches for a modified texture fill that is based on a preset library. When found, the fill is replaced with the original style pattern upon which the current fill is based.
Sub Test() |
Dim s As Shape |
Dim tf As TextureFill |
For Each s In ActivePage.Shapes |
If s.Fill.Type = cdrTextureFill Then |
Set tf = s.Fill.Texture |
If tf.LibraryName <> "" Then |
tf.Select tf.StyleName |
End If |
End If |
Next s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.