Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Exporting HTML to a Word.doc


Message #1 by "Joe Ehrenfeld" <joee@v...> on Wed, 11 Dec 2002 14:50:40
Is there a way in asp to let the user click a form button and have that 
form button export the contents of some form fields to a Word doc?
Message #2 by "Schelling, Michael" <schellim@s...> on Thu, 12 Dec 2002 05:34:33 -0500
Yep. Just put the following at the top of the form action asp page.  

<%
Response.ContentType = "application/msword"
Response.AddHeader "Content-Disposition", "attachment;filename=whatever.doc"

%>

More info:

http://www.infinetsoftware.com/content/officedocuments.asp
http://www.asp101.com/forum/display_message.asp?mid=145488
http://www.webmasterbase.com/article/698/31
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/ht
ml/scripting10162000.asp

Also searching Goggle for  ASP WORD will give you more info

Mike

Mike

-----Original Message-----
From: Joe Ehrenfeld [mailto:joee@v...]
Sent: Wednesday, December 11, 2002 9:51 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Exporting HTML to a Word.doc


Is there a way in asp to let the user click a form button and have that 
form button export the contents of some form fields to a Word doc?
Message #3 by "Joe Ehrenfeld" <joee@v...> on Thu, 12 Dec 2002 22:09:01
This is great, but how can I do this "behind the scenes"? When I do this 
now a download box pops up. I just wnat to be able to create the doc 
without the dialog box.

Thanks.

> Yep. Just put the following at the top of the form action asp page.  

<%
Response.ContentType = "application/msword"
Response.AddHeader "Content-
Disposition", "attachment;filename=whatever.doc"

%>

More info:

http://www.infinetsoftware.com/content/officedocuments.asp
http://www.asp101.com/forum/display_message.asp?mid=145488
http://www.webmasterbase.com/article/698/31
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dnclinic/ht
ml/scripting10162000.asp

Also searching Goggle for  ASP WORD will give you more info

Mike

Mike

-----Original Message-----
From: Joe Ehrenfeld [mailto:joee@v...]
Sent: Wednesday, December 11, 2002 9:51 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Exporting HTML to a Word.doc


Is there a way in asp to let the user click a form button and have that 
form button export the contents of some form fields to a Word doc?
Message #4 by Greg Griffiths <greg2@s...> on Thu, 12 Dec 2002 22:39:47 +0000
You could use something similar to 
http://www.greggriffiths.org/webdev/both/excel/ where you create Excel 
Sheets on the client side.

At 22:09 12/12/02 +0000, you wrote:
>This is great, but how can I do this "behind the scenes"? When I do this
>now a download box pops up. I just wnat to be able to create the doc
>without the dialog box.
>
>Thanks.
>
> > Yep. Just put the following at the top of the form action asp page.
>
><%
>Response.ContentType = "application/msword"
>Response.AddHeader "Content-
>Disposition", "attachment;filename=whatever.doc"
>
>%>
>
>More info:
>
>http://www.infinetsoftware.com/content/officedocuments.asp
>http://www.asp101.com/forum/display_message.asp?mid=145488
>http://www.webmasterbase.com/article/698/31
>http://msdn.microsoft.com/library/default.asp?url=/library/en-
>us/dnclinic/ht
>ml/scripting10162000.asp
>
>Also searching Goggle for  ASP WORD will give you more info
>
>Mike
>
>Mike
>
>-----Original Message-----
>From: Joe Ehrenfeld [mailto:joee@v...]
>Sent: Wednesday, December 11, 2002 9:51 AM
>To: ASP Web HowTo
>Subject: [asp_web_howto] Exporting HTML to a Word.doc
>
>
>Is there a way in asp to let the user click a form button and have that
>form button export the contents of some form fields to a Word doc?




  Return to Index