Hi I have been asked to go through a text file an remove certian Carriage Returns througout the text.
For example, they certian lines have something like .00
P5471-161 in it, and the two squarses, which repersents the two squares, which represents; and they want the two of these removed. I have no trouble bringing in the file and finding lines with the p5471-61 in it, but I cannot find away to remove the Carriage Returns. I have tried something like the following:
If InStr(1, line, "P5471") = True Then
If InStr(1, line, Asc(13)) Then
line = Replace(line, Asc(13), "")
End If
End If
But this only seems to remove one Carriage Return and move the line down.
If anyone has any ideas hear I would appreciate it.
For example, they certian lines have something like .00
P5471-161 in it, and the two squarses, which repersents the two squares, which represents; and they want the two of these removed. I have no trouble bringing in the file and finding lines with the p5471-61 in it, but I cannot find away to remove the Carriage Returns. I have tried something like the following:
If InStr(1, line, "P5471") = True Then
If InStr(1, line, Asc(13)) Then
line = Replace(line, Asc(13), "")
End If
End If
But this only seems to remove one Carriage Return and move the line down.
If anyone has any ideas hear I would appreciate it.