Solved

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

Posted on 2004-08-17
2
147 Views
Last Modified: 2010-05-02
from within VB to convert them into .html format.

Thanks in advance,
-Alex
0
Comment
Question by:AlexF777
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
mladenovicz earned 250 total points
ID: 11823835

    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
 
LVL 8

Assisted Solution

by:mladenovicz
mladenovicz earned 250 total points
ID: 11823853
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now