-
FileFind on the Mac
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.
[vba]
Dim DocumentRoot As String, MyFiles(1 To 300) As String
Dim i As Integer
DocumentRoot = "Macintosh HD:Users:edocuments"
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
[/vba]
Am I missing something, or does FileFind not work in Word 10.1.6 on the Mac ?
Ed
-
You might try adding a
[vba].FileName = ""[/vba]
as there has been some evidence that FileFind sometimes picks up .FileName from previous searches.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules