Previous Document Next Document
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.

Parameters
Description
Texture
Specifies the name of the texture to be applied
Library
Specifies the name of the texture library to which the texture belongs
This parameter is optional.

The following code example loops though all of the shapes on a page and searches for a modified texture fill that is based on a preset library. When found, it replaces the fill 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.