API Documentation > CorelDRAW > 2025-v26 > Page > IVGPage
Page.FindShape method
Find a single shape by it's name, type or Static ID on the a referenced page
Syntax:
Function FindShape(Optional ByVal Name As String, Optional ByVal Type As cdrShapeType = cdrNoShape, Optional ByVal StaticID As Long = 0, Optional ByVal Recursive As Boolean = True) As Shape
Parameters:
Name Type Description
Name
String
Type
Specifies the type of shape, and returns cdrShapeType.
StaticID
Long
Specifies the shape's unique ID.
Recursive
Boolean
Specifies whether to iterate through all shapes.
Remarks:
The FindShape method locates a shape that has the specified properties. If the shape cannot be found on the page, an empty reference (Nothing) is returned.
Examples:
The following VBA 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