Okay, here is slightly adapted
listing by Ken Puls
Code:
Option Explicit
'' based on listing written by Ken Puls (www.exelguru.ca)
Sub TextStreamTest()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fso As Object
Dim fdw As Object, sdw As Object
Dim fdr As Object, sdr As Object
Dim strText As String
'create file sysytem object
Set fso = CreateObject("Scripting.FileSystemObject")
'get file to read and open text stream
Set fdr = fso.GetFile("C:\Wat\Lookdb.ldb")
Set sdr = fdr.OpenAsTextStream(ForReading, False)
'create new file to write to
fso.CreateTextFile ("C:\Wat\Lookdb.txt")
Set fdw = fso.GetFile("C:\Wat\Lookdb.txt")
Set sdw = fdw.OpenAsTextStream(ForAppending, False)
'iterate through the end of first file
Do Until sdr.AtEndOfStream
'read string from the first file
strText = sdr.ReadLine & vbNewLine '<--added carriage return to jump on the next line
'write to the second one
sdw.Write strText
Loop
'close both files and clean up
sdr.Close
sdw.Close
Set sdr = Nothing
Set sdw = Nothing
Set fdr = Nothing
Set fdw = Nothing
Set fso = Nothing
End Sub
~'J'~