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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting to MS Word

Status
Not open for further replies.

shammack

Programmer
Mar 4, 2002
25
0
0
US
How do you get ColdFusion to export to MS Word? I used the CFCONTENT tag as follows, but that does not work for me.

<cfcontent type=&quot;application/msword&quot; >
also tried
<cfcontent type=&quot;application/vnd.ms-word&quot; >

Neither work. Any advice?
 
Looks like you got it right.

This is what I use:
Code:
<cfcontent type=&quot;application/msword&quot;>
<cfheader name=&quot;Content-Disposition&quot; value=&quot;filename=whatever.doc&quot;>

But you need to make sure that it's absolutely the first line in the file... and no other tags exist in the file that might contridict your CFCONTENT, as far as the browser is concerned (ie - no
Code:
<!DOCTYPE ...>
,
Code:
<body>
or
Code:
<html>
tags, etc)


-Carl
 
I am dealing with this problem as well. How do you format a page in MS Word so that when printing a table it will split correctly over to the next page? Also, do you know how to add headers and footers?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top