![]() |
![]() |
Page.FindShape
Function FindShape([Name As String], [Type As cdrShapeType = cdrNoShape], [StaticID As Long], [Recursive As Boolean = True]) As Shape
Member of Page
The FindShape method locates a shape with specified properties. If the shape cannot be found on the page, an empty reference (Nothing) is returned.
Parameters
|
Description
|
Name
|
Specifies the name of the shape on the page
This parameter is optional.
|
Type
|
Specifies the type of shape. This value returns cdrShapeType.
This parameter is optional, and its default value is cdrNoShape (0).
|
StaticID
|
Specifies a value which represents a shapes unique ID
This parameter is optional, and its default value is 0.
|
Recursive
|
Specifies whether to iterate through all of the shapes
This parameter is optional, and its default value is True.
|
The following code example finds a rectangle named Frame and selects it:
Sub Test() Dim s As Shape Set s = ActivePage.FindShape(Name:="Frame", Type:=cdrRectangleShape) If s Is Nothing Then MsgBox "The rectange 'Frame' cannot be found on page " & ActivePage.Index Else s.CreateSelection End If End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.