This is a discussion on How to open a word and Pdf document in the rich text box using C#.net within the C# Programming forums, part of the Software Development category; Hi, I am trying to open a word document using c#.net.I am getting the error of Retreiving the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, I am trying to open a word document using c#.net.I am getting the error of Retreiving the com class factory comaponent cls id 80070005. i have given full rights to asp.net in DCOM configuration file. But i am getting the same error. I can able to open a word document in C# windows application. But i am unable to open it in C#.net web application. This is the code to open a word document in C#. I have included the dll of Microsoft object 11.0 library. can anyone tell about this error? Word.Application obj_app = new Word.Application(); Word.Document obj_doc = new Word.Document(); object readOnly = false; object isVisible = true; object missing = System.Reflection.Missing.Value; object filepath = "D:\\WorkArea\\S.Bala\\Player Project\\LoadText\\Files\\document1.doc"; //file to be read obj_doc = obj_app.Documents.Open(ref filepath, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing); obj_doc.Select(); //Response.Write(obj_app.Selection.FormattedText.Tex t); richTextBox1.Text = obj_app.Selection.FormattedText.Text; obj_doc.Close(ref missing, ref missing, ref missing); obj_app.Quit(ref missing, ref missing, ref missing); |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Crack a password protected word document using C#? | $enthil | C# Programming | 3 | 11-19-2007 11:33 PM |
| How do I check that text entered in a text form field is an integer? | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 10-26-2007 12:25 AM |
| how to open and retrive text file(.txt)? | una_noche | Java Server Pages (JSP) | 1 | 08-17-2007 03:27 AM |
| How to Encode a text and Decode it to get the original text using c# .Net? | Archer | C# Programming | 1 | 07-21-2007 01:10 AM |
| How to convert a word document/text document/PDF file into an image file? | kingmaker | C# Programming | 0 | 07-16-2007 11:23 PM |