Skip to main content
Participant
October 7, 2009
Question

cfcontent causes problems with Word 2007

  • October 7, 2009
  • 1 reply
  • 2451 views

Hi,

My purpose is to export html contents into MS Word. The html contents may contain images.

I am using Coldfusion 8 and the simplified testing code I used is like the following:

<cfcontent type="application/msword">
<cfheader name="content-Disposition" value="attachment;filename=filename.doc">

<img src="http://localhost:8501/images/theCompanyLogo.JPG" height="36" width="185" border="0" />

This works perfectly for any Word versions (such as 2003) except Word 2007. When using Word 2007 the

image area shows error some thing like "the memory is not enough ..." and system is stuck until you

close all the IE windows with the Windows task Manager to recover every thing.

I did try to use "filename=filename.docx" instead of "filename=filename.doc" but did not help.

Is there any way to make this work or this is a limitation of the Coldfusion 8 (ie. the cfcontent is not

designed for Word 2007)? If so will the version 9 solve this problem?

    This topic has been closed for replies.

    1 reply

    Inspiring
    October 7, 2009

    The only news is bad news.  Office 2007 does not play nicely with any file produced by Cold Fusion.   We've had similar issues with Excel 2007, not quite as bad as yours though.

    Participant
    October 8, 2009

    Dan, have you received any help/solutions to this problem. I am experiencing the same issues. Data previously dumped into Excel and working w/ 2003, are getting "file corrupt..." errors. This issue, seems to me, should be addressed to MS as we also have issues with Oracle reports dumping into excel failing.

    Inspiring
    October 8, 2009

    We were looking at this today and it seems that if you create your files with Ben Nadel's POI Utility cfcs, it works better.  I thought I had tried this earlier, but, either I didn't, or did it poorly.

    google "coldfusion poi excel" to get yourself started.