Mar 11, 2002 #1 dxn131 Technical User Mar 11, 2002 1 CA I am looking for a solution in VBscript to replace <CR> and <LF> by a <SP> character when I am writing a replacement (<SP>) character to a text file. Can you show me how? Regards.
I am looking for a solution in VBscript to replace <CR> and <LF> by a <SP> character when I am writing a replacement (<SP>) character to a text file. Can you show me how? Regards.
Mar 11, 2002 #2 JohnYingling Programmer Mar 24, 2001 3,742 US Use Replace function. Not sire what <SP> is. Examples. strW = Replace(strW,Chr(13)," " ' Cr strW = Replace(strW,Chr(10)," " ' Lf strW = Replace(strW,Chr(13) & Chr(10) ," " ' CrLf with 1 space strW = Replace(strW,Chr(13) & Chr(10) ," " ' CrLf with 2 spaces http://www.VBResizer.com Generate Forms/Controls Resizing/Tabbing Class http://www.VBCompare.com Compare Code (Text) http://www.VBSortGen.com Generate Sort Class in VB or VBScript Upvote 0 Downvote
Use Replace function. Not sire what <SP> is. Examples. strW = Replace(strW,Chr(13)," " ' Cr strW = Replace(strW,Chr(10)," " ' Lf strW = Replace(strW,Chr(13) & Chr(10) ," " ' CrLf with 1 space strW = Replace(strW,Chr(13) & Chr(10) ," " ' CrLf with 2 spaces http://www.VBResizer.com Generate Forms/Controls Resizing/Tabbing Class http://www.VBCompare.com Compare Code (Text) http://www.VBSortGen.com Generate Sort Class in VB or VBScript