Word mime type and input buttons

L

Luis

I have a few input buttons at the end of an asp page. When I change the
mime-type of the asp page to create a Word Document which the user can
save, the input buttons are not displayed.
Is there a way to display the buttons AND have the mime type set to
vnd.ms-word on the same page?

<% @ Language=VBScript %>
<%
Response.ContentType = "Application/vnd.ms-word"
Response.AddHeader "content-disposition",
"attatchment;filename=Report.doc"

'Connect to db and retrieve data...
%>
<html>
<head>
<script language="JavaScript">
function SaveAs() {
document.execCommand('SaveAs',1,'Report.doc');
}
</script>
</head>
<body>
<%
'Create report using data retrieved from database
'At the end of the report display a Save, Edit and print button:
%>
<input type="button" name="btnSave" value="Save" onClick="SaveAs()">
<input type="button" name="btnEdit" value="Edit"
onClick="JavaScript:history.go(-1)">
<input type="button" name="btnPrint" value="Print"
onClick="window.print()">
</body>
</html>
 
E

Evertjan.

Luis wrote on 16 aug 2004 in microsoft.public.inetserver.asp.general:
I have a few input buttons at the end of an asp page. When I change the
mime-type of the asp page to create a Word Document which the user can
save, the input buttons are not displayed.
Is there a way to display the buttons AND have the mime type set to
vnd.ms-word on the same page?

You would have to find out the word code for buttons, as this is not
displayed as a browser html page. Perhaps there are MSword NGs that know
the answer.
<%
Response.ContentType = "Application/vnd.ms-word"
Response.AddHeader "content-disposition",
"attatchment;filename=Report.doc"

"attatchment" this will give an error, I suppose: Loose a "t".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top