I want to read the msword (.doc/.docx) file whole content which having images, styles, text everything in asp .net using c#.
I used to write following code it works fine.
// Microsoft.Office.Interop.Word.ApplicationClass wordApp = new
Microsoft.Office.Interop.Word.ApplicationClass();
string filePath1 = @"G:\ABOUT.docx";
object file = filePath1;
object nullobj = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Open(ref file,
ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,
ref nullobj);
Microsoft.Office.Interop.Word.Document doc1 = wordApp.ActiveDocument;
string m_Content = doc1.Content.Text;
txtbook.Text = m_Content;
doc.Close(ref nullobj, ref nullobj, ref nullobj);
but it is unable to read image files.
Please help I want to save whole content in database as html format and retrieve it in html format.