![]() |
![]() |
Shapes.FindShapes
Function FindShapes([Name As String], [Type As cdrShapeType = cdrNoShape], [Recursive As Boolean = True], [Query As String]) As ShapeRange
Member of Shapes
The FindShapes method finds shapes with the specified properties and returns them as a ShapeRange object that contains all of the shapes that are found.
Parameters
|
Description
|
Name
|
Specifies a shape by its name
This parameter is optional.
|
Type
|
Specifies a shape by its type
This parameter is optional, and its default value is cdrNoShape (0).
|
Recursive
|
Specifies whether to iterate through all of the shapes
This parameter is optional, and its default value is True.
|
Query
|
Allows you to specify a query by using the Corel Query Language (CQL). For information on performing queries, please see the section Performing queries.
For specific information on searching for objects, please see the section How can objects be searched for?
This parameter is optional.
|
The following code example finds all of the rectangles on the current page and fills them with red:
Sub Test() Dim sr As ShapeRange Set sr = ActivePage.FindShapes(Type:=cdrRectangleShape) If sr.Count <> 0 Then sr.ApplyUniformFill CreateRGBColor(255, 0, 0) Else MsgBox "There are no rectangles on the current page" End If End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.