hi
i want to display word file with same style using asp.net c#

here is code that display word file content without images ,tables ,etc......

      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,
      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);

any idea to display

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.