Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export CF data to Word without prompting for Save

Status
Not open for further replies.

alarge23

Programmer
Oct 26, 2003
50
US
I currently have a coldfusion page that displays data. I give the user an option to export the data to Word. This works fine but, I would like to be able to schedule this CF program to run every day and email the Word document to my users.

I am looking for a way to export data to Word without being prompted to Save. Is this possible?
 
What method are you using to export that data to word? have you got a clever custom tag?

Thanks,

Rob
 
I use cfcontent/cfheader tags to extract to Word. But I always get the prompt to Open/Save the document.

<cfcontent type="application/msword">
<cfheader name="Content-Disposition" value="attachment;filename=FileExtract.doc">
 
You need a routine that creates the file and saves it to the Web server file system. An automated task won't be able to use CFCONTENT; no browser is involved (and you don't want one involved ;^)).

There are some programs out there like HTML2Word that you may be able to use, or play with the Word COM object.

HTH,



Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
I'll have the roast duck with the mango salsa.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top