473,473 Members | 1,723 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Word mime type and input buttons


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>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
1 2893
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".

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Eduard Dewolf | last post by:
Hi, Im have been changing my site to make it HTML 4.01 compliant As I should, I wrapped all INPUT tags in blocks I wrapped the not visible INPUT type HIDDEN tags in first PRE, later H6 tags...
17
by: Mike | last post by:
I am trying to write a web page where a person can click on a word document and MS Word is launched instead of the document being displayed in the IE browser. I have been able to launch MS Word but...
3
by: David Alyea | last post by:
I am writing pages that have hrefs to Word docs and Excel files. I'd like the link to function so that when it is clicked on in IE, instead of the browser showing the Word or Excel document that...
1
by: Dave | last post by:
Hi all, I was trying to make an image submit button with a rollover and discovered to my suprise that there is no way to access a form element of the "image" type. I tried specifying it by name...
0
by: clevariant | last post by:
Hello, I'm tasked with creating a WSDL file that is compatible with .NET's code gen' tool, wsdl.exe. I'm getting an error in the code output saying "Missing soap:body input binding", which...
3
by: richi | last post by:
Hello, i'm hoping that somebody can point me in the right direction with my problem. I have been tasked with creating a simple browser based application that will allow the user to upload Word...
2
by: David Thielen | last post by:
Hi; I've see this done so I know it's possible. How can I set things up so a user clicks on a rtf file on the website, that launches it in Word where they edit it, and then when they click the...
0
by: José Joye | last post by:
hello, I have to communicate with a web Service for which I received the WSDL below. When trying to generate the client proxy, it gives me the error (see below). After investigation, I have...
6
by: squishywaffle | last post by:
This has got me somewhat stumped, so I'll throw it up here in hopes that someone has ran into this before. I'm trying to send a MIME package to Esko Backstage. I'm a bit confused as to how to send...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.