Are you trying to generate a file that gets saved (HTML tags and all) to a file or do you want to generate a file that gets displayed in the browser (and the HTML gets rendered by the browser)?
If you want to save it, than the code that you posted should be fine. And, as an HTML file, you'd expect to see HTML tags when you open the file in a text editor. If you want to display it, than replace the word "attachment" in the CFHEADER tag with "inline". -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -----Original Message----- > From: Les Mizzell [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 10, 2002 9:07 AM > To: CF-Talk > Subject: RE: cfinclude inside a cffile tag? > > > Morning, > > Thanks for all your help on this so far. I've still got one more problem > that I'm scratching my head over. The cfinclude template "app_OUTPUT.cfm" > contains HTML formatting. However, when the file #MyFile# is > generated, the > HTML doesn't render - I'm actually seeing the raw HTML code in the file as > below: > > <br>0001 3.00 W > <br>00ANN > <br>01A01   > > > Code below (thanks for your help) works perfectally except for the HTML > rendering... > > > <cfsavecontent variable="sqlOutput"> > <cfinclude template="app_OUTPUT.cfm"> > </cfsavecontent> > > <cffile action="WRITE" > file="c:\inetpub\hostroot\www.mySITE.com\files\#MyFile#" > output="#sqlOutput#" > addnewline="Yes"> > > <cfheader > name="content-disposition" > value="attachment; filename=#MyFile#"> > > <cfcontent type="text/html" > file="c:\inetpub\hostroot\www.mySITE.com\files\#MyFile#" > deletefile="No" reset="Yes"> > > > Ideas?? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm

