i want to display word document with same style in the webpage
goggled for this and found function display the content without styles" font size , tables , images ,etc....."
C#
ApplicationClass wordApp = new ApplicationClass();
object file = path;
object nullobj = System.Reflection.Missing.Value;
object format = true; 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,
ref nullobj,
ref nullobj,
ref nullobj,
C#
ref nullobj);
doc.ActiveWindow.Selection.WholeStory();
doc.ActiveWindow.Selection.Copy();
string sFileText = doc.Content.Text;
//string style = doc.
doc.Close(ref nullobj, ref nullobj, ref nullobj);
wordApp.Quit(ref nullobj, ref nullobj, ref nullobj);
Response.Write(sFileText);
Answers
Know the answer? Post it. Somebody with the same question will find it here.