Jobs
Author: nandhini Date Submitted: 11/28/2006 Category: Forms Compatibility: VB 3 This code has been accessed 3761 times.
Email Yourself this snippet:
Dim fn as string Dim fill As File Dim ts As TextStream Dim s, c As String
Code
FN = "D:\FINAL.TXT" If FN <> "" Then Set fill = fsyo.GetFile(FN) Set ts = fill.OpenAsTextStream(ForReading) s = ts.ReadAll c = vbNewLine + vbNewLine d = vbNewLine + " " s = Replace(s, c, vbNewLine) s = Replace(s, d, vbNewLine) ts.Close Set ts = fill.OpenAsTextStream(ForWriting) ts.Write s ts.Close End If