1

Happy Friday everyone!

I would appreciate some direction on this.

I have processed an .html file as follows:

strStringToClean = Replace(strStringToClean, vbCr, vbCrLf)   
strStringToClean = Replace(strStringToClean, vbLf, vbCrLf)      
strStringToClean = Replace(strStringToClean, cr, vbCrLf)        
strStringToClean = Replace(strStringToClean, lf, vbCrLf)        
strStringToClean = Replace(strStringToClean, """""", """")

(as you can see, throwing in some redundant lines in a effort to trouble shoot)

When the file is close and then inspected in NotePad++ I see "CR LF" at the end of every line (the original file has only "LF". However, when I open it for input (Open MyFile for Input as #1), everything is pulled back as a single line, making it almost impossible to parse.

Any thoughts would be greatly appreciated.

Thanks!

Trip

Trip Ives
  • 71
  • 7
  • You are opening it in Excel? – Scott Craner May 11 '18 at 17:25
  • Scott, Thank you for taking the time to help. I had initially deleted this question (about 5 min after posting) because I realized I had made a simple mistake that I already knew the answer to. However, I'll leave this up as it may help someone else. If I remember correctly (several hundred lines of code later) I was writing the output using "Write #1, myString" as opposed to "Print #1, myString". In my experience, "Write" will result in VbCrLf not working properly while "Print" will. At least, I think I remember that being the problem. Thanks again! :-) – Trip Ives May 13 '18 at 13:43

1 Answers1

1

Trying to remember the solution a few days on now... However, if I remember correctly, the issue was that I was writing the output using "Write #1, myString" as opposed to "Print #1, myString". In my experience, "Write" will result in VbCrLf not working properly while "Print" will.

Trip Ives
  • 71
  • 7