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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RTF - Save/Rename/Format 1

Status
Not open for further replies.

jmlady

Programmer
Nov 20, 2003
19
0
0
US
Hey again,

I'm currently trying to create a program that takes a file, (an .ODL file - a running script) and deletes a word in a certain line. That works fine, however; when I try to save the contents of the RTB.Text back as the .ODL file, the program that I use with the .ODL file won't run, because of the "/per" on every line.

I need the script exactly the way it is before I open it...when I save it, with the exception of that one line I changed. How could I go about doing this?
-----

Also, How would I go about renaming a file (e.g. Test.txt to Test.tx_)?


Thanks in advance
 
1. What code are you using to save the text back to the .ODL file?

2. [tt]Name "C:\fred.txt" As "c:\fred1.txt"[/tt]

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
the code to save..

Form2.RTB.SaveFile (test.ODL)

I believe that's it..
 
Try specifying the format:

Form2.RTB.SaveFile ("test.ODL", rtfText)

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
hmm, it worked....Thanks a lot!
 
You're welcome, and thanks for the Star!

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top