i want to read a microsoft word file without use of data connection,
If by "doc" you mean "Word 2003 document" then it's not a plain text file to start with - it's a binary file format. I'm not sure whether it's documented anywhere, although clearly projects like Open Office have reverse-engineered it.
If by "doc" you mean something else, please clarify.
Word documents use the .doc extension, and can optionally be saved in an XML-based format. If you have the option of doing that instead, you can use an XML parsing library to get at the content. The whole schema is pretty complicated but you may be able to extract some useful things from it in a simple way.
".doc" is a not a simple text based file format. You have to use interop for maniuplation.
Include the COM Libary "Microsoft Word 12.0 Object Library". Create an ApplicationClass and use the property Documents to open your document.
object wordPath = null;
object missing = System.Reflection.Missing.Value;
wordPath = @"C:\sample.doc";
// Create Interop object
ApplicationClass word = new ApplicationClass();
word.Visible = false;
// Open document
Document doc = word.Documents.Open(ref wordPath,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing);
// Set document as active for interaction
doc.Activate();
// Select the whole content of the word document
word.Selection.WholeStory();
// Get the text from the document
string text = word.Selection.Text;
There is a very good introduction at the blog of Scott C. Reynolds.
object wordPath = null; object missing = System.Reflection.Missing.Value;
wordPath = @"C:\sample.doc";
// Create Interop object
ApplicationClass word = new ApplicationClass();
word.Visible = false;
// Open document
Document doc = word.Documents.Open(ref wordPath,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing);
// Set document as active for interaction
doc.Activate();
// Select the whole content of the word document
word.Selection.WholeStory();
// Get the text from the document
string text = word.Selection.Text;