| | |
Reading Document file
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
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 asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox class click commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols problem radio ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webservice wizard xml youareanotmemberofthedebuggerusers





