Some of you may be exporting data to Word (RTF, actually) as per
http://tech.irt.org/articles/js154/index.htm. I use this method to create a
"printable page" with a header and footer on each page.
I wanted to pass along something I learned today about that. I had a CFML variable
which contained a "<br>". When I passed this variable to the RTF file, it displayed
"<br>" instead of actually doing a carriage return. Simple, I hear you saying, just
replace the <br> with CRLF, chr(13) & chr(10). Nope, didn't work.
So I made a small RTF file, read it in via CFFILE, and printed each character and its
ASCII code. I saw that a new line is equivalent to the 6 characters CRLF\par, or
chr(13) chr(10) chr(92) chr(112) chr(97) chr(114).
So there you go. Replace "<br>" with "chr(13) & chr(10) & chr(92) & chr(112) &
chr(97) & chr(114)".
(Also posted to eVolt.)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists