Remove the excess blank line in a text file
Remove the excess blank line in a text file
API Declarations
Dim fill As File
Dim ts As TextStream
Dim s, c As String
Rate Remove the excess blank line in a text file
(1(1 Vote))
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
Remove the excess blank line in a text file Comments
No comments yet — be the first to post one!
Post a Comment