a potential command line option - triggered by CF, but only watched not 
executed.

[EMAIL PROTECTED] [ 9:39:34 AM ]

Const ForReading = 1
Const ForWriting = 2

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Scripts\Text.txt", ForReading)

strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "Jim ", "James ")

Set objFile = objFSO.OpenTextFile("C:\Scripts\Text.txt", ForWriting)
objFile.WriteLine strNewText
objFile.Close

[EMAIL PROTECTED] [ 9:48:58 AM ]        
http://www.rimrocksoftware.com/rsedit.html


From: "Andy Mcshane" <[EMAIL PROTECTED]>
Reply-To: cf-talk@houseoffusion.com
To: CF-Talk <cf-talk@houseoffusion.com>
Subject: RE: Web Based Mail Merge? (not email!)
Date: Sun, 3 Apr 2005 10:48:04 +0100

I did something like this some time ago, I created the word document, put 
place holders in for my data, saved it as an rtf file. I then had to copy 
the RTF text into a .cfm page, process my place holders to put my text in 
and then save the RTF text back out to another file. This worked well. This 
was fine when I could control content of the document. Where this 
requirement now differs is that I want the user to create their own RTF 
documents and then upload them to our web server into a template directory.

Let me run this idea by you, If I provide the user with a list of 
pre-defined merge field codes, i.e. the coldfusion code that maps to a 
required peice of data in the database, so that they can create their very 
own RTF documents, let them upload the document to the template directory on 
the server, I could then read the RTF file line by line to replace the merge 
fields with data and write out completed letters to another file. Does 
anybody see any problems with this idea? Are text file read & writes much of 
an overhead for the server? I envisage that anywhere between 1 - 300+ 
letters may need to be produced at any one time.

________________________________


you could generate RTF files on the files.

add <<mailmerge fields>> to a word document - save as RTF and us CF to
generate RTF and make available for download.






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201328
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to