This content has been marked as final. Show 5 replies
The following is from http://fusionauthority.com/Specials/4536-ColdFusion-MX-7-0-1-Mac-OS-X-Support-Java-CFCProx y-Flash-Functions-in-CFFORM-and-More.htm. It appears to be available in CF 7.0.1.
"RTF support for cfreport -- This was something that Macromedia had originally planned for Blackstone, but they ran out of time. As RTF can be opened directly into Microsoft Word, cfdocument now has the ability to create content in the major document formats."
cfdocument now has the ability to create content in the major document formats ?????
But <cfdocument format="rtf"> gives a blank page.
Actually, the RTF feature seems to have been added to CFREPORT - see http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm ?context=ColdFusion_Documentation&file=part_cfm.htm.
Just want to know what version of CF are you using? I am using CF 7 and I use cfcontent and cfheader to create data into MS Word.
What about generating the document in HTML and changing the header type ...
<cfparam name="url.docpath" default=""/>
<cfparam name="url.filename" default=""/>
<cfparam name="url.docid" default=""/>
<cfparam name="mimeType" default="application/x-unknown"/>
<cfset filecontent = session.fileManager.getFile(url.docpath, url.filename)/>
<cfset filename = url.fileName />
<!--- method for getting mime type taken from UDF getFileMimeType() at cflib.org --->
<cfset mimeType = getPageContext().getServletContext().getMimeType(url.filename) />
<cfset filecontent = cfcatch.message />
<cfheader statuscode="404" statustext="Not Found">
<cfheader name="Content-Disposition" value='attachment; filename="#filename#"'>