API Documentation > CorelDRAW > 2025-v26 > TextRange > IVGTextRange
TextRange.Underline property
Gets/sets the Underline property of the range
Syntax:
Property Get Underline() As cdrFontLine
Property Let Underline(ByVal Value As cdrFontLine)
Remarks:
The Underline property returns or specifies whether an underline is applied to a text range.
Examples:
The following VBA example underlines all text in the paragraph with a thin double line.
Sub Test()
Dim t As Text
Dim s As Shape
Dim d As Document
Set d = CreateDocument
Set s = d.ActiveLayer.CreateParagraphText(2, 2, 8, 8, "This is an example.")
Set t = s.Text
t.Story.Underline = cdrDoubleThinFontLine 
End Sub