The usual way is to use macros. You allow your users to choose from a pre-defined set of macros such as
[firstname] [lastname] [address] And when you process the document you replace these macros with real values. Russ -----Original Message----- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 14:37 To: CF-Talk Subject: Replace or REReplace function question. Hi all, I am trying to come up with a way to do the following; User creates/edits a basic letter/mailshot document on line using FCKeditor. Within this document the user can add some pre-defined CF output fields i.e. <cfoutput>#details.firstname#</cfoutput>. This is with the idea of trying to do a simple mailshot by extracting the names and addresses required from the database, selecting the letter/mailshot text from the database, looping thorugh the recordset inside of a cfdocument tag and producing a PDF of all the letters. The point at which I am stuck is actually replacing the output tags inserted into the original text with the required data from the database before allowing cfdocument to process it. Does anyone have any suggestions/ideas on the best way to replace my tags with the required text? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216356 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54