HighTechTalks DotNet Forums  

convert HTML to Word doc

Dotnet XML microsoft.public.dotnet.xml


Discuss convert HTML to Word doc in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?Q2FzcGVy?=
 
Posts: n/a

Default convert HTML to Word doc - 07-09-2007 , 11:16 AM






I have this code that creates an HTML formatted document and I can open the
document through Word. But I want the format to be truely MS Word (2003).
Does anyone know how to do this?

Here's my code that does the first conversion:

xmlfile = "myfile.xml"
xsltfile = "myfile.xslt"

Dim xmlDoc As New XmlDocument()
xmlDoc.Load(Server.MapPath(xmlfile))

Dim xslTran As XslTransform = New XslTransform()
xslTran.Load(Server.MapPath(xsltfile))




Response.ContentType = "application/msword"
Response.ContentEncoding = System.Text.Encoding.Default
Response.Charset = ""
xslTran.Transform(xmlDoc, Nothing, Response.Output)


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.