what is so interesting about line 1006? what are you trying to get out of it?

you can use a function like this (when it is split with vbnewline)

Code:
Private Function ExtractLine(LineNumber As Integer, TextString) As String

On Error GoTo ErrHandler

  Dim SPT() As String 'Split Text
    
    'When you split your array will start with 0. but in our language 0 is not a line 1 would be the first line not 0.
    'so i will substract 1 number from Line_Number to be the exact match
    
    SPT = Split(TextString, vbNewLine)
    MsgBox UBound(SPT)
    ExtractLine = SPT(LineNumber - 1)
  Exit Function
  
ErrHandler:
  MsgBox "Invalid Line Number.", vbInformation, "Error while Extracting Text"
End Function
Get line text like this

Code:
MsgBox ExtractLine(1,Text1.Text)
but in this case the string is all one line for some reason.. well when i use your code there is no vbNewLine split

i'm not sure exactly what you want to do but you might have to get object by object from the document... or go by TAG / ID / ELEMENT name