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

Stitch RTFs together?

Status
Not open for further replies.
May 9, 2000
446
GB
Hi, carrying on from an earlier post...

I've generated an rtf from MS Word (which is stupidly massive) anyway i've put half of the code into a file called rtf1.txt and the other into rtf2.txt. I've then got an asp that:

1. Reads and copies the lines from rtf1.txt into output.rtf

2. Gets values from an access dtabase and pastes them into output.rtf

3. Reads lines from rtf2.txt and prints the lines into output.rtf

My problem is that the resulting output.rtf on't open in word, it says it can't find the file although I'm dobule clicking on it to open it! Can anyone help me out? I'm basically trying to have an rtf template file that I can insert my own values / text into...

Cheers
 
My guess is that the rtf file format includes some kind of "file starts here" and "file ends here" tags, at least when generated by Word, and so your file effectively looks like

Start RTF
Some Stuff
End RTF
Start RTF
Some Stuff
End RTF

and that Word doesn't consider it valid or something.

This Wikipedia article explains the basics of the format and provides links to specifications:
Though not being able to find the file is weird. Have you opened it with Notepad to ensure that it seems like a valid file? Did you maybe somehow accidentally set it to 0 length?
 
got it working, i just needed to add vbCtrLf to the end of each line write.

Do you know of any other programs that can output formatted RTF cuz word produces sooo much its hard to take out the bits I want to change etc!
 
one program i've used for handling postscripts is "ROPS" (not sure if it handles RTF as well) and "TED" for RTF, TED is open source, and damn fast.

other RTF editor/viewers (free) :
easy text
this is from nonags, it's a freeware site, there's a handful of editor/viewers there, recommend : LogEdit

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
also if you search google for rtf viewer, there's a proggie that will convert RTF's to EXE's for view only purpose, just in case these are for distribution and you would like to make them read-only

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top