HOME

Tuesday, January 3, 2012

Display word document in text box C#

_Application WordApp = new Microsoft.Office.Interop.Word.Application();

object WordFile = Server.MapPath("~/jobportal/resumescemt/MCA/" + txtEmailID.Text + ".doc");
object RdOnly = false;
object Visible = true;
object Missing = System.Reflection.Missing.Value;
Document Doc = WordApp.Documents.Open(ref WordFile, ref Missing, ref RdOnly, ref Missing, ref Missing,
ref Missing, ref Missing, ref Missing, ref Missing, ref Missing,
ref Missing, ref Visible, ref Missing, ref Missing, ref Missing,
ref Missing);
txtResume.Text = Doc.Content.Text;

No comments:

Post a Comment