API Documentation > CorelDRAW > 2025-v26 > Page > IVGPage
Page.TextFind method
Finds matching text on the page object, selects all matches and returns the first object
Syntax:
Function TextFind(ByVal Text As String, ByVal CaseSensitive As Boolean) As Shape
Parameters:
Name Type Description
Text
String
CaseSensitive
Boolean
Remarks:
The TextFind method finds a text object that contains the specified text.
Examples:
The following VBA example creates three text objects, finds the text object that contains the word Sentence, and fills the text object with red.
Sub Test()
Dim s As Shape
ActiveLayer.CreateArtisticText 0, 0, "Text1"
ActiveLayer.CreateArtisticText 0, 3, "Some Sentence."
ActiveLayer.CreateArtisticText 0, 5, "Word"
Set s = ActivePage.TextFind("Sentence", True)
If Not s Is Nothing Then
  s.Fill.UniformColor.RGBAssign 255, 0, 0
End If 
End Sub