API Documentation > CorelDRAW > 2025-v26 > TextRange > IVGTextRange
TextRange.Fill property
Gets the fill
Syntax:
Property Get Fill() As Fill
Remarks:
The Fill property returns the fill (or Fill object) applied to a text range.
Examples:
The following VBA example applies a conical fountain fill to the last word of the paragraph text.
Sub Test()
Dim d As Document
Dim s As Shape
Dim t As Text
Set d = CreateDocument
Set s = d.ActiveLayer.CreateParagraphText(2, 2, 4, 4, "This is an example")
Set t = s.Text
t.Story.Words.Last.Fill.ApplyFountainFill CreateRGBColor(255, 0, 0), CreateRGBColor(0, 0, 255), cdrConicalFountainFill 
End Sub