Posted on: 8/5/2014 9:06:44 PM | Views : 618

Hi,
I need to parse the uploaded word doc. Need to loop thru each bookmarks and read the content/value. So far, I am only able to read the bookmark text. below is the code. Am I missing something here?

Microsoft.Office.Interop.Word.Application wordApp = null; Microsoft.Office.Interop.Word.Document doc = null; try { string strs = string.Empty; object missing = System.Reflection.Missing.Value; object readOnly = true; object visible = false; object fileName = "c:\\Projects\\Practice\\BookmarkDoc.doc";
//create application object wordApp = new Microsoft.Office.Interop.Word.Application(); wordApp.Visible = false;
doc = new Microsoft.Office.Interop.Word.Document();
doc = wordApp.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref visible, ref missing, ref missing, ...

Go to the complete details ...