I recently had to write a script to generate RTF documents from data in a database.
Creating the template was an interesting experience because the RTF format seems to do all kinds of wacky stuff if you erase stuff, cut, paste, etc. Two things I found. Making your RTF template with MS Word, not with Wordpad, and #2 - don't make any mistakes creating your template. Don't erase anything. Just type. What i ended up doing was making my rtf template by opening a document and typing in stuff like VARIABLE001 VARIABLE002 VARIABLE003, and then just doind a find/replace on the document to replace the placeholders with my data. I had initiall tried pasting in VARIABLEXXX then going through and changing the "XXX" to the numbers, only to find that for some reason when I was done, "VARIABLE001" didn't appear in the RTF source as I would expect. Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337448 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

