Do you even need the HTML at all? I bet that's what is causing the problem. If 
you're sending a binary file straight to the browser, the HTML won't do any 
good, and is probably causing ColdFusion to override your cfheader tag.

Correct me if I'm wrong, but I'd try it just like this:

<cfheader name="content-disposition" value="attachment;filename=testdoc.doc">
<cfcontent type="application/msword" file="#ExpandPath(".")#\testdoc.doc" 
deletefile="yes">

-Robbie

>Hi
>
>I am using the following code to display a word document, but in the
>browser all that is displayed is binary code?
>
>------------snippet------------
><title>Untitled Document</title>
><cfheader name="content-disposition"
>value="attachment;filename=testdoc.doc">
></head>
>
><body>
>
><cfcontent type="application/msword"
>file="#ExpandPath(".")#\testdoc.doc" deletefile="yes">
>
>--------------------------------------
>Any ideas on why this is happening, I am using CFMX 7 on Windows 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319256
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to