how to search a word in Micro Soft documents(Word, Excel,Powerpoint)-urgent?

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2008
Posts: 21
Reputation: itshibu is an unknown quantity at this point 
Solved Threads: 0
itshibu itshibu is offline Offline
Newbie Poster

how to search a word in Micro Soft documents(Word, Excel,Powerpoint)-urgent?

 
0
  #1
Mar 4th, 2009
Dear Friends,

I would like to search a word or phrase in microsoft documents. I want to search text portion only. f possible line by line. so i can exit the reading while I find that word.

I tried with
  1. OpenFileDialog1.ShowDialog()
  2.  
  3. Dim ioFile As New StreamReader(OpenFileDialog1.FileName)
  4. Dim ioLine As String ' Going to hold one line at a time
  5. Dim ioLines As String ' Going to hold whole file
  6. ioLine = ioFile.ReadLine
  7. ioLines = ioLine
  8. While Not ioLine = ""
  9. ioLine = ioFile.ReadLine
  10. ioLines = ioLines & vbCrLf & ioLine
  11. End While
  12. TextBox1.Text = ioLines

But unfortunately some files are not reading properly.


pls help
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC