i have this code to read data from word document and bind to editor control it works fine but when it bind data from word to editor control it lost all the formating i want to keep the formatting of word document please suggest thanks
FileUpload1.SaveAs(Server.MapPath(FileUpload1.FileName));
object filename = Server.MapPath(FileUpload1.FileName);
//object filename = "/MyRNDinASP/Panchanan Gouda.docx";
Microsoft.Office.Interop.Word.ApplicationClass AC = new Microsoft.Office.Interop.Word.ApplicationClass();
Microsoft.Office.Interop.Word.Document doc = new Microsoft.Office.Interop.Word.Document();
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
try
{
doc = AC.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 isVisible);
//TextBox1.Text = doc.Content.Text;
Editor1.Content = doc.Content.Text;
}
catch (Exception ex)
{
MessageBox.Show("ERROR: " + ex.Message);
}
finally
{
doc.Close(ref missing, ref missing, ref missing);
}