cumulate different textfiles to one with access vba

Z

zigi

Hello,

I want to cumulate different textfiles to one with access vba.
my problem is, that I need to ignore the first line in each textfile.

Can somebody post some code examples to do this?

Thanks in advance.
Zigi
 
D

Douglas J Steele

Dim intFile As Integer
Dim strBuffer As String
Dim strFile As String

intFile = FreeFile()
Open strFile For Input As #intFile
If Not EOF(intFile)
' Read the first line into the buffer, and do nothing with it.
Line Input #intFile, strBuffer
Do While Not EOF(intFile)
' Read each subsequent line into the buffer, line by line
Line Input #intFile, strBuffer
....

Loop
End If

' Close file.
Close #intFile
 
Top