API Documentation > CorelDRAW > 2025-v26 > Text > IVGText
Text.Find method
Finds text
Syntax:
Function Find(ByVal Text As String, ByVal CaseSensitive As Boolean, Optional ByVal StartIndex As Long = 1, Optional ByVal WrapAround As Boolean = False, Optional ByVal IndexingType As cdrTextIndexingType = cdrCharacterIndexing) As Long
Parameters:
Name Type Description
Text
String
CaseSensitive
Boolean
StartIndex
Long
Specifies the first text object in a text range. If the index type is set to word, and the start index is 3, the StartIndex parameter begins the range at the third word in the selected text frame.
WrapAround
Boolean
Specifies whether the text follows the path of an object's shape or bounding box.
IndexingType
Specifies, through a value of cdrTextIndexingType, the type of text to find. The indexing type can be character, word, or paragraph.
Remarks:
The Find method locates a specified text string in a text stream.
Examples:
The following VBA example creates a paragraph-text object containing the text Lorem Dolor Sit. It then looks for the word Dolor and inserts the word Ipsum (plus a space) in front of the text, resulting in the string Lorem Ipsum Dolor Sit.
Sub Test()
Dim s As Shape, n As Long
Set s = ActiveLayer.CreateParagraphText(0, 0, 2, 1, "Lorem Dolor Sit")
n = s.Text.Find("Dolor", False)
If n <> 0 Then s.Text.Characters(n, 0) = "Ipsum "

End Sub