API Documentation > CorelDRAW > 2025-v26 > TextRange > IVGTextRange
TextRange.Paste method
Replaces the current text range and returns the new one
Syntax:
Function Paste() As TextRange
Remarks:
The Paste method replaces a text range and returns the new one.
Examples:
The following VBA example creates paragraph text, applies bold formatting to the fourth and fifth words, and italicizes the first word. It then copies the text range and pastes it in the second paragraph.
Sub Test()
Dim d As Document
Dim s As Shape
Dim s1 As Shape
Dim t As Text
Set d = CreateDocument
Set s = d.ActiveLayer.CreateParagraphText(3, 3, 5, 5, _
  "This is an example.")
Set s1 = d.ActiveLayer.CreateParagraphText(7, 7, 9, 9)
Set t = s.Text
t.Story.Words(4, 2).Bold = True
t.Story.Words(1).Italic = True
t.Story.Copy
s1.Text.Story.Paste 
End Sub