Results 1 to 3 of 3

Thread: Dumping Output To Word

  1. #1

    Thread Starter
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160

    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?

  2. #2
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    280
    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&nbsp;</TD>"
    response.write"</TR>"
    response.write"</TABLE></BODY></HTML>"

    %>

  3. #3

    Thread Starter
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160
    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
  •  



Click Here to Expand Forum to Full Width