Hi all,

I need to append a text file using generic file I/O commands in VB6.
How do I append my text to first position in text file?

I tried working like :

Code:
    
    Dim FileNo As Integer
    Dim FilePath As String
    
    FileNo = FreeFile
    FilePath = "C:\Samplefile.txt"

    Open FilePath For Binary As FileNo
    Seek FileNo, 1
    Put FileNo, , "First Text" & vbCrLf
    Put FileNo, , "Second Text" & vbCrLf
    Close FileNo
but this overwrite the first line in my text file.

Regds,