Object Model Reference : Classes : P : Page : Methods : Page.TextReplace |
Sub TextReplace(OldText As String, NewText As String, CaseSensitive As Boolean, [ReplaceSelectedOnly As Boolean = True])
Member of Page
The Replace method finds and replaces a specified text string.
The following VBA example creates three text objects and replaces the word Some with Short (resulting in one of the text objects becoming Short Sentence).
Sub Test() |
ActiveLayer.CreateArtisticText 0, 0, "Text1" |
ActiveLayer.CreateArtisticText 0, 3, "Some Sentence." |
ActiveLayer.CreateArtisticText 0, 5, "Word" |
ActivePage.TextReplace "Some", "Short", True, False |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.