Reading an (RTF)Rich Text Format or MS-WORD file in Vb.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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, underline) etc.

So , how can i make programme which allows me to read (RTF) Rich Text Format
files or Microsoft WORD files in VB.NET through FILE HANDLING.

Plz help me
 
Hi Eshban,

Dont know abt the Word Docuemnt .. but for the RTF is a plain text file with
the text in proper format.

In case you want to read the RTF as a file, u will have to Parse the RTF
text and then get the text as well as the formatting.
This can be tedious, the parsing. 'Cause you might have to know the rtf in
detail and these \f0 things can be hard to read.

One thing that you can do - if it fits ur scenario - is that you can take an
object of RichTextBox and set its RtfText property with the text you have
read from the file - some juggling for the header might be required here.
And then use the RTF controls other methods to do whatever you want to do
with the data.

Ask if there is something else.

HTH
rawCoder
 
I don't think you can read Word files without making calls into MS-Word (COM
or VBA).
 
Back
Top