RE: HTML to MS WORD doc using ASP?

by "Brett Errington" <brett(at)opensearch.com>

 Date:  Thu, 13 Jun 2002 09:19:09 +0800
 To:  <hwg-techniques(at)hwg.org>
 In-Reply-To:  nuvox
  todo: View Thread, Original
Hiya

Can't be done sorry, Microsoft haven't released their code to the world
it seems. What we did instead is create a proper Rich Text file and name
it with a .doc extension so that word opens it. It gives you almost the
same functionality (especially if you use Microsoft's extended RTF
specifications) except for pictures and a few other things. A URL I have
bookmarked that will help you is:

http://msdn.microsoft.com/library/?url=/library/en-us/dnrtfspec/html/rtf
spec.asp?frame=true?frame=true

If you need more help, just give us a yell and I'll see what I can do :)

Later,
Brett

"Oooooh... they have the Internet on computers now..." - Homer Simpson

-----Original Message-----
From: owner-hwg-techniques(at)hwg.org [mailto:owner-hwg-techniques(at)hwg.org]
On Behalf Of Mike Taylor
Sent: Wednesday, 12 June 2002 10:35 PM
To: hwg-techniques(at)hwg.org
Subject: HTML to MS WORD doc using ASP?

I am trying to figure out a way to generate a Word Document using HTML
code
pulled from my SQL database table using ASP, which is the easy part.
The
hard part so far has been trying to figure out a way for the HTML to get
RENDERED in the Word document --that is, I don't want to see HTML tags
there, I want the <.b>bold<./b> to get generated as bold text, the <.br>
tags to get generated as line breaks, etc.

Is there any way to do this?

So far, I simply do the following:

<%
Response.ContentType = "application/msword"

Response.Write(MyHTMLCode)

%>

Is there a parameter to feed MS Word so that it will properly render the
HTML and not simply display the raw code inside the Word Document?

Thanks for any suggestions.

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA