•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 428,064 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,463 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1085 | Replies: 7
![]() |
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
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 Subhere 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
<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
<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... :)
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
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


Linear Mode