I need to be able to access Microsoft Word documents *.doc ( I do not need to access formatting, just bare text )

from within VB to convert them into .html format.

Thanks in advance,
-Alex
AlexF777Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mladenoviczConnect With a Mentor Commented:

    Dim WordApp As New Word.Application
    Dim WordDoc As Word.Document
   
    Set WordDoc = WordApp.Documents.Open("C:\a.doc")
    WordDoc.SaveAs "C:\a.html", wdFormatHTML
   
    WordDoc.Close
   
    Set WordDoc = Nothing
    Set WordApp = Nothing

You will need reference to MS Word
0
 
mladenoviczConnect With a Mentor Commented:
If you want pure text use wdFormatText  - Saves text without formatting. Converts all section breaks, page breaks, and new line characters to paragraph marks. Uses the ANSI character set. Use this format if the destination program cannot read any of the other available file formats.
0
All Courses

From novice to tech pro — start learning today.