If you can't load the document into a table, and the text file is too big to load into memory, you could also use the Binary form of Line Input. You can then move anywhere in the file, but you will have to find end-of-line markers (vbCrLf) using instr(), etc.
Something like this:
Public Function ConvertCRLFtoLF(ByVal FileToConvert$) As Boolean
Dim Char As String * 1
Dim CharPlus1 As String * 1
Dim ChannelIn As Integer
Dim ChannelOut As Integer
Dim FileMaxChars As Long
Dim FilePosIn As Long
Dim FilePosOut As Long
Dim FileTemp$
Dim I As Integer
Dim Iplus1 As Integer
'Dim CR$
Dim SaveFound$
Dim SavePanel$
FileMaxChars = FileLen(FileToConvert$)
FileTemp$ = StripFile(FileToConvert$) & "junkCRLF.tmp" ' Final file is overwritten onto original.
ChannelIn = FreeFile
Open FileToConvert$ For Binary Access Read As #ChannelIn
ChannelOut = FreeFile
Open FileTemp$ For Binary Access Write As #ChannelOut
FilePosIn = 0
Do Until EOF(ChannelIn)
FilePosIn = FilePosIn + 1
Get #ChannelIn, FilePosIn, Char
I = Asc(Char)
If I <> 13 Then ' Found Carriage Return, strip it
FilePosOut = FilePosOut + 1
Put #ChannelOut, FilePosOut, Char
Else
Get #ChannelIn, FilePosIn + 1, CharPlus1
Iplus1 = Asc(CharPlus1)
If Iplus1 = 10 Then
FilePosOut = FilePosOut + 1
Put #ChannelOut, FilePosOut, CharPlus1
FilePosIn = FilePosIn + 1
Else
FilePosOut = FilePosOut + 1
Put #ChannelOut, FilePosOut, Char
End If
End If
Loop
Close #ChannelIn
Close #ChannelOut
DoEvents
Kill FileToConvert$
Name FileTemp$ As FileToConvert$
ConvertCRLFtoLF = True
End Function
Note that this example reads one character at a time, which is the SLOWEST way to do this. It's much better to read blocks of, say, 1000 characters at a time if you're interested in speed.