Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 2005 Windows Type Search

Status
Not open for further replies.

UncleT

Programmer
Sep 26, 2001
133
US
Hello,

I am fairly new to VB 2005 and I was given a potential project by my boss the other day. We have a place on the network that contains various files (.doc and .PDF). These files are work policys. My boss is wanting me to see if I can write an application that will allow the user to type into a textbox a string and the applicaton will search the location the policy files are located and bring back all files that have the string you typed in the name or somewhere in the file. Is there a way to do this in VB 2005 and if so can someone help me out on this one.

Thanks,

UncleT
 
You should be able to search the names and trhough the .doc files easily enough. Take a look at the File.IO namespace for help with getting all files in a folder, opening and closing, and reading through a text file. If you get stuck on something, please come back with what you have tried first.

Searching through pdf is not something you will be able to do easily though. You can search the pdf names, but the pdf itself is stored more like an image, so you can't "open" it in a text editor and search through it.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
 
The windows search function will do what I want it to do. It will search the .doc and .pdf files. Is there a way in VB 2005 to access that search engine?
 
Are you positive Windows Search will do the search into Acrobat you think it does? I am running Windows Vista Ultimate and cannot reproduce that. It definitely does search the name....just not inside the file itself.

I don't know what APIs you would have to work with to leverage the Windows Search, but as I stated it is easy enough to work with the System.IO namespace and do searches by name and inside the contents of text, csv, doc, xls, and many other formats.

Please show us what you have tried and what is not working for you...We will be glad to help you find the path you are looking for.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top