API Documentation > CorelDRAW > 2025-v26 > SegmentRange > IVGSegmentRange
SegmentRange.AddRange method
Adds all segments from the given range to the current range
Syntax:
Sub AddRange(ByVal SegmentRange As SegmentRange)
Parameters:
Name Type Description
SegmentRange
Remarks:
The AddRange method adds segments from a specified segment range to the active range, combining the two ranges.
Examples:
The following VBA example creates a text object containing the letter B and converts it to curves. Then it creates a range containing the segments from the second and third subpaths (that is, the inner "holes" in the letter B) and converts those segments to lines.
Sub Test()
Dim s As Shape
Dim sgr As SegmentRange
Set s = ActiveLayer.CreateArtisticText(0, 0, "B")
With s.Text.FontProperties
  .Name = "Arial Black"
  .Size = 72
End With
s.ConvertToCurves
Set sgr = s.Curve.Subpaths(2).Segments.All
sgr.AddRange s.Curve.Subpaths(3).Segments.All
sgr.SetType cdrLineSegment 
End Sub