Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

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
0
AlexF777
Asked:
AlexF777
  • 2
2 Solutions
 
mladenoviczCommented:

    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
 
mladenoviczCommented:
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now