Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove form feed characters from a string before writing to a file ?

Status
Not open for further replies.

bct10

Technical User
May 3, 2004
37
US
I have a string of text that has two form feed
characters chr12 in it I like to remove them be for i write the string
here what I have so far

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.OpenTextFile("abc.txt")
Set MyFile = ofso.CreateTextFile("C:\WINDOWS\Desktop\testfile.txt", True)
While oFile.AtEndOfStream <> True
str1 = oFile.ReadLine

MyFile.WriteLine str1

Wend
oFile.close
MyFile.Close

thanks for any help
 
Something like this ?
str1 = Replace(oFile.ReadLine, Chr(12), "")

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hello bct10,

It is replace by empty.
Code:
str1 = replace(str1, chr(12),"")
regards - tsuji
 
Thanks Phv tsuji
thats what I was looking for
works great Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top