473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Reading Microsoft Word files

I need to read some (about 15,000) word documents and add some wrappers
around them for importing into a database. What is the best way to read a
..doc file in VB? I would like to save the formatting as .RTF so it can be
included.

I can do this in Word VBA, but I would prefer to do it in straight VB
(either VB6 or .Net).

Thanks for any help on this.

David
Jul 17 '05 #1
4 15254
Word Automation would work for you..

Basic connection to the Word object for automation:
http://www.veign.com/vrc_codeview.asp?type=app&id=62

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"David Erickson" <er*******@earthlink.net> wrote in message
news:6i****************@newsread2.news.atl.earthli nk.net...
I need to read some (about 15,000) word documents and add some wrappers
around them for importing into a database. What is the best way to read a
.doc file in VB? I would like to save the formatting as .RTF so it can be
included.

I can do this in Word VBA, but I would prefer to do it in straight VB
(either VB6 or .Net).

Thanks for any help on this.

David

Jul 17 '05 #2
Veign,

Thank you. I did not think of Word automation. How is the performance for
this? If I am changing 1000 files each day, how much system overhead will
this cause?

David

"Veign" <me@home.com> wrote in message
news:8t****************@newsread3.news.atl.earthli nk.net...
Word Automation would work for you..

Basic connection to the Word object for automation:
http://www.veign.com/vrc_codeview.asp?type=app&id=62

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"David Erickson" <er*******@earthlink.net> wrote in message
news:6i****************@newsread2.news.atl.earthli nk.net...
I need to read some (about 15,000) word documents and add some wrappers
around them for importing into a database. What is the best way to read
a
.doc file in VB? I would like to save the formatting as .RTF so it can
be
included.

I can do this in Word VBA, but I would prefer to do it in straight VB
(either VB6 or .Net).

Thanks for any help on this.

David


Jul 17 '05 #3
I guess it really depends on your system and the size of the Word Documents.
The easiest way is to create a simple test...

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"David Erickson" <er*******@earthlink.net> wrote in message
news:yA*****************@newsread2.news.atl.earthl ink.net...
Veign,

Thank you. I did not think of Word automation. How is the performance for this? If I am changing 1000 files each day, how much system overhead will
this cause?

David

"Veign" <me@home.com> wrote in message
news:8t****************@newsread3.news.atl.earthli nk.net...
Word Automation would work for you..

Basic connection to the Word object for automation:
http://www.veign.com/vrc_codeview.asp?type=app&id=62

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"David Erickson" <er*******@earthlink.net> wrote in message
news:6i****************@newsread2.news.atl.earthli nk.net...
I need to read some (about 15,000) word documents and add some wrappers
around them for importing into a database. What is the best way to read a
.doc file in VB? I would like to save the formatting as .RTF so it can
be
included.

I can do this in Word VBA, but I would prefer to do it in straight VB
(either VB6 or .Net).

Thanks for any help on this.

David



Jul 17 '05 #4
Thanks for your help. I have tried this and it works okay, but very slowly.
I thought that was going to be okay, until I talked to the user again and
found out there are actually more than 100,000 documents to process.

What I need to do is:
1. Read the doc file
2. extract account number, name, and date
3. convert to RTF
4. Add an HL7 wrapper around the RTF file
5. save into the application's HL7 inbox.

Is there a package that will allow me to open a .doc file more quickly than
word automation?

Thanks again!
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: hokiegal99 | last post by:
This is not really a Python-centric question, however, I am using Python to solve this problem (as of now) so I thought it appropiate to pose the question here. I have some functions that search...
8
by: Phil Slater | last post by:
I'm trying to process a collection of text files, reading word by word. The program run hangs whenever it encounters a word with an accented letter (like rôle or passé) - ie something that's not a...
4
by: Erpman | last post by:
I am trying to access the data with in a wav file. I am testing with very small files in order to keep the code simple to start with. Basically, im writing the entire wav file to a byte using a...
10
by: T Cordon | last post by:
I am using a StreamReader to read text from an HTML file and display it as part of a page in a Label Control. Buy it is not displaying characters as: ñ, ó, ú, etc. Please Help. Thanks
2
by: Stu | last post by:
Hi, I have a web app that needs to receive freight booking in MS Word format. There are a number of tables in the docs that contain the relevant data (origin/destination etc.). Can someone...
2
by: Eshban Bahadur | last post by:
Hello, I want to read (RTF) files in my VB.NET programme. How can i do it. I apply the same method of reading text files, but it does not save the formatting of text like (bold, italics,...
3
by: tigrrgrr42 | last post by:
I am working(vb.net03and05) with word documents stored in a sql db and I am currently bringing them from a byte array into a temp file to pop into word and make word do its thing as a com object. ...
3
by: ahammad | last post by:
Well, the title pretty much describes what I want to do. I want to be able to read the contents of a Word document (*.doc). I also want to be able to read it to a CString object, and then search that...
1
navanova
by: navanova | last post by:
Greetings, I have a problem of opening ms word and excel files on my computer. The files are there for a long time. I use to open and modify them. Suddenly, when i try to open the word files, a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.