![]() |
![]() |
TextRange.Duplicate
Function Duplicate() As TextRange
Member of TextRange
The Duplicate method returns a copy of the TextRange object.
The following code example duplicates the first five characters of the paragraph and displays them in a message box:
Sub Test() Dim d As Document Dim t As Text Dim s As Shape Dim tr As TextRange Set d = CreateDocument Set s = d.ActiveLayer.CreateParagraphText(3, 3, 5, 5, "This is an example.") Set t = s.Text Set tr = t.Story.Characters(1, 5).Duplicate MsgBox "The text that is duplicated is: " & vbCr & tr.Text End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.