HTML to Word document conversion

Can someone help in creating a word document from html text using Office Automation plugin. I tried the below but without successful.

Dim word As New WordApplication

word.Documents.Add
word.Visible = False
word.Selection.TypeText(“<html><body><b>Hello</b></body></html>”)
word.ActiveDocument.SaveAs(“C:\HTMLDoc.docx”)

I simply save a html doc with a doc extension

what do you want to do with this document?
Want to open it with Wod? Browser ?

Tried that but when you open the file in word it shows the html text as it is. For example

<html><body><b>Hello</b></body></html>
should show as
Hello

Yes trying to open the final document in microsoft word.

need to use this instead of

<meta http-equiv="Content-Type" content="application/msword;charset=utf-8" />

instead of the this…

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

the same apply to excel like the following

<meta http-equiv="Content-Type" content="application/vnd.ms-excel;charset=utf-8" />

This worked. Thanks for the suggestion.

I have been doing this for > 10 years since moving to wkhtmltopdf…

just remember for the excel and doc version of html, the image include need to be resize for real like generating thumbnail images while using html, you can do the the width and height in the html code for image.

for some reason excel and doc ignore your width and height in the code