Word to HTML Converter in VB.NET?
I am looking for sample code that will help me convert Word documents into HTML format. I'd hoped it would be as simple as loading a DOC file into the axBrowser and then saving, but as always, nothing's that easy in .NET. The DOC loads into the browser object, but I can't seem to reference it as an HTML document. When I try, I get "SPECIFIED CAST IS NOT VALID". I assume this means that it's not an HTML document and that's the problem. Here's the code which works fine when viewing a HTML document in the browser object:
Dim doc As mshtml.HTMLDocument
Dim strHTML As String
doc = brsDocument.Document <-----GET ERROR HERE
strHTML = doc.body.innerHTML
Loop Until Not (strHTML Is Nothing)
Any clues for me?