Consulting

Results 1 to 2 of 2

Thread: FileFind on the Mac

  1. #1
    VBAX Regular
    Joined
    Jan 2006
    Posts
    56
    Location

    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

  2. #2
    VBAX Tutor
    Joined
    Mar 2005
    Posts
    268
    Location
    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
  •