Can someone please, post a code. how can i open and read word document using NetOffice.
Dec 3, 2011 at 12:49 PM
Edited Dec 3, 2011 at 12:49 PM
open and read a document in word is very easy and exactly the same as interop or VBA. here is sample in C#
// initialize NetOffice, must be called 1 times in your application before use
// open word and an existing document
Word.Application wordApplication = new Word.Application();
Word.Document newDocument = wordApplication.Documents.Open(@"C:\myWordFile.doc");
// read text of document
string plainContent = newDocument.Content.Text;
// close word and dispose reference
NetOffice gives you a lot sample projects in C# and VB. checkout the examples folder in release package.
the most example code is also online available. an overview you find here: