| | |
Reading Document file
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
hi..
to read a document file in Asp.Net and Vb.net as a Code behind , Use following Code
here in ResumePath send the file name to read.
Best Luck
to read a document file in Asp.Net and Vb.net as a Code behind , Use following Code
ASP.NET Syntax (Toggle Plain Text)
Sub Read(ByVal RPath As String) If RPath <> "" Then Dim WordApp As New Word.ApplicationClass Dim filepath = Server.MapPath("images\Resume\") & RPath Dim File As Object = filepath Dim nullobj As Object = System.Reflection.Missing.Value Dim doc As Word.Document = WordApp.Documents.Open(File, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj) Dim doc1 As Word.Document = WordApp.ActiveDocument Dim m_Content As String = doc1.Content.Text txtResume.Text = m_Content doc.Close(nullobj, nullobj, nullobj) End If End Sub
here in ResumePath send the file name to read.
Best Luck
Accept Challenges and Enjoy Coding... :)
in this u need to add reference. Do this as follows..
project by right clicking in
the solution explorer on References->Add Reference. Click on the COM
tab and look for the Microsoft Word 9.0 Object Library. Click Select
and OK.
And then add this line in web config file
project by right clicking in
the solution explorer on References->Add Reference. Click on the COM
tab and look for the Microsoft Word 9.0 Object Library. Click Select
and OK.
And then add this line in web config file
ASP.NET Syntax (Toggle Plain Text)
<system.web> <identity impersonate="true"/>
Accept Challenges and Enjoy Coding... :)
•
•
•
•
in this u need to add reference. Do this as follows..
project by right clicking in
the solution explorer on References->Add Reference. Click on the COM
tab and look for the Microsoft Word 9.0 Object Library. Click Select
and OK.
And then add this line in web config file
ASP.NET Syntax (Toggle Plain Text)
<system.web> <identity impersonate="true"/>
Hi All,
But here is the problem when we use it on server. i get COM exception
is any other way to read Word File without third party control ?
Accept Challenges and Enjoy Coding... :)
![]() |
Similar Threads
- Reading from a text file and using it as a database (Visual Basic 4 / 5 / 6)
- Error reading XML file in Javascript (JavaScript / DHTML / AJAX)
- Reading from a file question (Python)
- Reading from a file to fill an array (Java)
- MFC File I/O Philosophy questions/clarifications (C++)
- Guestbook help. Post in two different spots. (Perl)
- problem reading xml file in c# (C#)
- Reading MSWord Document through an ASP Statement (ASP)
Other Threads in the ASP.NET Forum
- Previous Thread: pop up menu in asp.net 2005 with c# like yahoomail
- Next Thread: Online data,css,js Security
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist development dgv dropdownlist dropdownmenu dynamically edit fileuploader fill flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice youareanotmemberofthedebuggerusers





