reading doc file in textbox using .net2005 with c#
Answer Posted / anand
ApplicationClass WordOper = new ApplicationClass();
String filePath = Server.MapPath("../Files/Book.doc");
Object file = filePath;
object nullobj = System.Reflection.Missing.Value;
Document doc = WordOper.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);
Document doc1 = WordOper.ActiveDocument;
string m_Content = doc1.Content.Text;
TextBox1.Text = m_Content;
doc.Close(ref nullobj, ref nullobj, ref nullobj);
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How does servicing work for the .net framework 3.0? If I install the .net framework 3.0, can I get service updates for the .net framework 2.0?
what do you mean by table-per-hierarchy?
Asp.net mvc application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?
How route table has been created in asp.net mvc?
How does the 'page lifecycle' of asp.net mvc works?
what is conceptual model?
What is objectset? : Entity framework
Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?
What are the Core features of ASP.NET MVC?
What is the "helperpage.isajax" property?
How we can add the CSS in ASP.Net MVC?
What is web api‘s in asp.net mvc 4 ?
What is entitycontainer? : Entity framework
What are Action Methods in ASP.NET MVC?
Explain how to use multiple submit buttons in ASP.Net MVC?