Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Everett James   on Dec 11 In MS Office Category.

  
Question Answered By: Abbas Hashmi   on Dec 11

I think there would be some requirements that have to be met.
Does the user  have a drive mapped to the network  servers?
Does the user have read permission for the network folder and files.
(And all "parent" folders)
It would help if you could narrow the search.
I mean, at my location, I have read access to 2,301,000 files
located in 345,000 folders. (which is certainly not ALL of the data  stored on
our servers!
I certainly wouldn't want to search through all of them if I didn't have to!
You can modify this to search for specific files:
Set fs = Application.FileSearch
With fs
.LookIn = "C:\My Documents"
.SearchSubFolders = True
.FileName = "cmd*"
If .Execute() > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files  found."
End If
End With

hope this gets you moving in the right direction!

Share: 

 
 


Tagged: