Previous Document Next Document
Page.TextFind

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

Member of Page

The TextFind method finds a text object containing specified text.

Parameters
Description
Text
Specifies a string, contained in quotation marks, indicating the text to search for
CaseSensitive
Determines whether the search string should look for case sensitive text. If the parameter is set to True, the text in the Text parameter must match the case of the text in the text range.

The following code 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 2007 Corel Corporation. All rights reserved.