PDA

View Full Version : FileFind on the Mac



mansky
04-21-2006, 02:51 PM
Hi,
Has anyone gotten the FileFind object to work on the Mac? I'm using OSX 10.2.8 and Office/Word 10.1.6.

The following code snippet returns 0 for the .FoundFiles.Count. My Perl script finds 258 Word documents in the same directory tree.


Dim DocumentRoot As String, MyFiles(1 To 300) As String
Dim i As Integer

DocumentRoot = "Macintosh HD:Users:ed:Documents"
With Application.FileFind
.SearchPath = DocumentRoot
.FileType = msoFileTypeWordDocuments
.SearchSubFolders = True
.Execute

With .FoundFiles
Debug.Print "Count = " & .Count
If .Count > 0 Then
For i = 1 To .Count
MyFiles(i) = .Item(i)
Next i
End If
End With
End With

Am I missing something, or does FileFind not work in Word 10.1.6 on the Mac ?


Ed

BlueCactus
04-25-2006, 04:17 PM
You might try adding a
.FileName = ""
as there has been some evidence that FileFind sometimes picks up .FileName from previous searches.