|
-
Oct 4th, 2002, 09:19 AM
#1
Thread Starter
Frenzied Member
Dumping Output To Word
I have a web app running on our local intranet. All workstations in the company have MS Word on their local machines.
At the moment, all reports are dumped to screen, in the browser, and printed from there. I've a request to build in the functionality to allow users to dump a report to a word document (which the users could, later, attach to an EMail message)
My current META TAG reads (in part)
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
I'm thought that if I change "content="text/html;" to "content="ms word;" that MS Word would open a new document and dump the report contents into it. I thought wrong. Am I at least on the correct track?
Also, could I have an If/Then/Else statement in a META tag which would change the content based on a user selection?
-
Oct 4th, 2002, 10:30 AM
#2
Hyperactive Member
yes - U are on the right track,
re - with a intranet web app (in asp?)...
I use stuff like this? - maybe this will help? (create as word.asp & run)
<%
response.Buffer = TRUE
'--response.ContentType = "text/html"
'--response.ContentType = "text/text"
'--response.ContentType = "application/vnd.ms-powerpoint"
'--response.ContentType = "application/vnd.ms-excel"
response.ContentType = "application/msword"
response.write"<HTML><BODY>"
response.write"<TABLE WIDTH=75% BORDER=1 CELLSPACING=1 CELLPADDING=1>"
response.write"<TR>"
response.write"<TD><font size=+2>First Name</font></TD>"
response.write"<TD><font size=+2>Last Name</font></TD>"
response.write"<TD><font size=+2>Phone</font></TD>"
response.write"</TR>"
response.write"<TR>"
response.write"<TD>joe</TD>"
response.write"<TD>bloggs</TD>"
response.write"<TD>12345532523452345234 </TD>"
response.write"</TR>"
response.write"</TABLE></BODY></HTML>"
%>
-
Oct 4th, 2002, 12:37 PM
#3
Thread Starter
Frenzied Member
Thanks...I'll give it a shot.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|