title: VBScript remove newline
body: <p>I have an HTML page with one or more newlines after <code>&lt;/html&gt;</code>. My VBScript file is able to find the replace the newlines with emptiness. But, it looks like OpenTextFile is putting a newline at the end again. Help!</p>
  
  <pre><code>'Pulled this from the InterWebs
  Const ForReading = 1 Const ForWriting = 2
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  Set objFile = objFSO.OpenTextFile("a.html", ForReading)
  strText = objFile.ReadAll
  'Wscript.Echo strText
  objFile.Close
  
  strNewText = Replace(strText, "&lt;/html&gt;" &amp; vbCrlf, "&lt;/html&gt;")
  Set objFile = objFSO.OpenTextFile("a.txt", ForWriting)
  objFile.WriteLine strNewText
  objFile.Close
  </code></pre>