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
153 Views
Last Modified: 2010-05-02
from within VB to convert them into .html format.

Thanks in advance,
-Alex
0
Comment
Question by:AlexF777
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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