Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Create Simple Microsoft Word Document

Explorer ,
Jul 07, 2009 Jul 07, 2009

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

TOPICS
Advanced techniques
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 07, 2009 Jul 07, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 07, 2009 Jul 07, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 07, 2009 Jul 07, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 07, 2009 Jul 07, 2009

There is also one for word and one for powerpoint.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 08, 2009 Jul 08, 2009
LATEST

I've just found a blog post that will do exactly what I need...

http://www.jensbits.com/2009/06/21/using-coldfusion-to-generate-a-word-document/comment-page-1/#comment-286

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources