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


Please Help Members By Posting Answers For Below Questions

What is Differnce between html.action and ajax.action?

562


what is use of entitydatasource control?

601


What is the use .Glimpse in ASP.Net MVC

573


Explain the new features 3.5 framework against with the tool?

498


how do you mark a property as required? For example, for a project, the name is a required field.

578






What is web api‘s in asp.net mvc 4 ?

582


Explain how you can send the result back in JSON format in MVC?

578


Are there any parts of the .net framework 3.0 that only work on windows vista?

557


Explain covariance and contra-variance in .net framework 4.0. Give an example for each.

570


Is .net framework dead?

533


What is the use of razor view engine?

527


What is the use of action filters in an mvc application?

608


How to make sure Client Validation is enabled in ASP.Net MVC

560


What is Layout in ASP.Net MVC?

573


what is deferred loading(lazy loading)?

576