Skip to main content
simonbingham
Inspiring
July 7, 2009
Question

Create Simple Microsoft Word Document

  • July 7, 2009
  • 2 replies
  • 1773 views

Hello,

What's the easiest way to create a simple Microsoft Word document on the fly from Coldfusion?

Also, I need to be able to insert page breaks into the document.

Many thanks in advance for your assistance.

Simon

This topic has been closed for replies.

2 replies

Inspiring
July 7, 2009

Take a look at www.bennadel.com.  Using the poi will give you more functionality than cfcontent.

simonbingham
Inspiring
July 7, 2009

Hi Dan,

It looks like Ben's POI Utility to meant to be used with Microsoft Excel rather than Microsoft Word. Is that correct?

http://www.bennadel.com/projects/poi-utility.htm

Many thanks,

Simon

Inspiring
July 7, 2009

There is also one for word and one for powerpoint.

simonbingham
Inspiring
July 7, 2009

I've figured it out...

<cfheader name="Content-Disposition" value="inline; filename=test.doc">
<cfcontent type="application/msword">
<cfoutput>#Now()#</cfoutput>

Does anyone know how to force a page break?