Sara,
Do you mean that you want to read the text that's contained in a Microsoft
Word file? The Microsoft Word file format is a propietary binary format.
Although you could read the raw bytes using System.IO.Streamreader, they
wouldn't be very meaningful.
The simplest thing would be to work with plain text files. For example, you
could manually open the file in Word and use "save as" to convert it to
plain text. (Of course, you'll lose all the formatting in the new file.)
Then you could use StreamReader or TextReader to read each line.
If you need to read unconverted Microoft Word documents, you'll need to use
Microsoft Word Automation. You can programatically create a new instance of
Microsoft Word, open a Word document, and then retrieve the text of the
active Word document (or smaller chunks of text) by using the Microsoft Word
Range object.
Here are some resources to get you started:
Understanding the Word Object Model from a .NET Developer's Perspective
http://msdn.microsoft.com/library/de...wordobject.asp
INFO: Develop Microsoft Office Solutions with Visual Studio .NET
http://support.microsoft.com/?kbid=311452
HOWTO: Use Automation to Get and to Set Office Document Properties with
Visual Basic .NET
http://support.microsoft.com/?kbid=303294
Office Development
http://msdn.microsoft.com/vbasic/usi...e/default.aspx
Microsoft Office 2000/Visual Basic Programmer's Guide
http://msdn.microsoft.com/library/de...mmersguide.asp
"sara" <> wrote in message
news:0e2c01c38775$05bb7300$...
> I have a .net applicationa and need to read a word
> document line by line. I need to parse certain lines into
> certain fields of the database. I Haven't a clue how to do
> this.
>
> Can anyone help please??