Previous Document Next Document

Object Model Reference : Classes : P : Page : Methods : Page.TextFind


Page.TextFind

Function TextFind(Text As String, CaseSensitive As Boolean) As Shape

Description

Member of Page

The TextFind method finds a text object that contains the specified text.

Parameter
Description
Text
Specifies the text to search for
CaseSensitive
Specifies whether the search string is case-sensitive
If the parameter is set to True, the text in the Text parameter must match the case of the text in the text range.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.