View Single Post
  #3 (permalink)  
Old June 8th, 2004, 01:49 PM
tommy03 tommy03 is offline
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh, right. The code DUH!!!
Sorry about that
My first post AND my first screw-up (well at least I got that out of the way) :D

Here is the code :

Set fs = Application.FileSearch
With fs
    .LookIn = "C:\My Documents"
    .FileName = "*.doc"
    If .Execute(SortBy:=msoSortbyFileName, _
            SortOrder:=msoSortOrderAscending) > 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


Thanks again!

Reply With Quote