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 objectset? : Entity framework

551


Can we change web.config settings from iis?

559


Why is the .net framework 3.0 a major version number of the .net framework if it uses the .net framework 2.0 runtime and compiler?

564


What is entity sql? : Entity framework

561


How would you deploy your old applications with .net framework 4.0? Are the old applications compatible?

488






What is razor code?

598


What is edm in entity framework?

532


Will there be a .net compact framework 3.0 release with release of .net framework 3.0?

542


What is object service? : Entity framework

635


what is csdl?

590


What is meant by tempdata in mvc?

540


Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?

541


In razor syntax, what is the escape sequence character for @ symbol?

561


what is entity sql?

608


Explain the types of Scaffoldings.

631