Free Support Forum - aspose.com

Query for exporting HTML to word

Hi,

Is it possible to export a HTML page as shown in the browser with all formatting to a word document using a dot template ?


This message was posted using Aspose.Live 2 Forum

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your interest in Aspose.Words. Yes, you can convert HTML to DOC.

1. You can convert existing HTML document to Word format using the following code.

Document doc = new Document("in.html");

doc.Save("out.doc", SaveFormat.Doc);

2. You can insert snippet of HTML into the document using InsertHtml method. See the following link.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.documentbuilder.inserthtml.html

Best regards.