G
Guest
I am trying to remove some line feed characters. I believe they are Chr(182)
(the paragraph sign)
My vba code sees the character but does not replace it with a blank, which
is what I need to do.
Public Sub GetText()
Dim intFile As Integer
Dim strInput As String
Dim outFile As Integer
Dim strCRLF As String
Dim strFill As String
Dim strClean As String
strCRLF = Chr(182)
strFill = " "
intFile = FreeFile()
Open "C:\Temp\MYREPORT.txt" For Input As #intFile
Open "C:\Temp\MY REPORT CLEAN.txt" For Output As #2
Do While Not EOF(intFile)
Line Input #intFile, strInput
strClean = Replace(strInput, strCRLF, strFill)
Debug.Print strClean
Write #2, strClean
Loop
Close #intFile
Close #2
End Sub
(the paragraph sign)
My vba code sees the character but does not replace it with a blank, which
is what I need to do.
Public Sub GetText()
Dim intFile As Integer
Dim strInput As String
Dim outFile As Integer
Dim strCRLF As String
Dim strFill As String
Dim strClean As String
strCRLF = Chr(182)
strFill = " "
intFile = FreeFile()
Open "C:\Temp\MYREPORT.txt" For Input As #intFile
Open "C:\Temp\MY REPORT CLEAN.txt" For Output As #2
Do While Not EOF(intFile)
Line Input #intFile, strInput
strClean = Replace(strInput, strCRLF, strFill)
Debug.Print strClean
Write #2, strClean
Loop
Close #intFile
Close #2
End Sub