Error opening PowerPoint file with cfcontent

I am unable to open a powerpoint (ppt) document using cfcontent. My code has no problem opening other types of office documents. Below is the code:

<cfheader name="content-disposition" value="attachment; filename=#qry.clientFile#"/>
<cfcontent type="#qry.contentType#/#qry.contentSubType#" variable="#qry.documentData#"/>

      

qry.clientFile = Presentation2.ppt
qry.contentType = application
qry.contentSubType = vnd.ms-powerpoint
qry.documentData = document itself

I am using the line above to open another document with no problem. Also, I am trying to open Office 2003 ppt file in office 2007.

+2


source to share


1 answer


If you are just passing the filename as an invalid variable argument. You need to provide a binary variable in the variable argument. If you only have a file on disk, you need to use the file argument with the full path to the Powerpoint file itself.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_c_11.html



<cfcontent type="#qry.contentType#/#qry.contentSubType#" file="#ExpandPath(qry.documentData)#">

      

Dan

+1


source







All Articles