Option Explicit Rem This example sets the selection of a document to a range of characters within Rem a multi-line text art item Private Sub Command1_Click() Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim textArt As Illustrator.TextArtItem Dim textArtRange As Illustrator.TextRange Dim selectionTextRange As Illustrator.TextRange Dim textArtLine As Illustrator.TextLine Dim selectionStart, selectionEnd As Integer Rem Get a reference to the first text art item in the document If (appRef.Documents.Count = 0) Then Set frontDocument = appRef.Documents.Add() Else Set frontDocument = appRef.ActiveDocument End If If (frontDocument.TextArtItems.Count = 0) Then Set textArt = frontDocument.TextArtItems.Add() textArt.Position = Array(100, 425) textArt.Contents = "Illustrator" & vbCr & "Scripting" & vbCr & "Is" & vbCr & "Powerful" textArt.TextRange().Size = 48 End If Set textArt = frontDocument.TextArtItems(1) Set textArtRange = textArt.TextRange Rem get references to line 2 and 3. We do this so we can find the character offset of the Rem first character in line 2 and the last character in line 3. We'll use these values to Rem create the selection text range Set textArtLine = textArtRange.TextLines(2) selectionStart = textArtLine.Offset Set textArtLine = textArtRange.TextLines(3) selectionEnd = textArtLine.Offset + textArtLine.Length Rem Create the selection text range. Note that TextRanges use a 1-based index. Set selectionTextRange = textArtRange.TextRange(selectionStart, selectionEnd) Rem sel the selection of the document frontDocument.Selection = selectionTextRange End Sub