v'la mon code si ca peux aider...
Code :
Private Sub ChercherRepertoire(startDir As String)
Dim fileNamePDF As String
Dim currDir As String
Dim dirList As New Collection
On Error GoTo Err_Chercher
If Right$(startDir, 1) <> "\" Then startDir = startDir & "\"
dirList.Add startDir
While dirList.Count
'remove current directory from directory list
currDir = dirList.Item(1)
dirList.Remove 1
'find all files and subdirectories in current, add to list
fileNamePDF = Dir$(currDir, vbDirectory)
While Len(fileNamePDF)
If (fileNamePDF <> ".") And (fileNamePDF <> "..") Then
If GetAttr(currDir & fileNamePDF) = vbDirectory Then
EcrireLog (currDir & fileNamePDF)
dirList.Add currDir & fileNamePDF & "\"
Else 'work on the file
If InStr(UCase(currDir & fileNamePDF), ".PDF") Then
VerifPDF (currDir & fileNamePDF)
End If
End If
End If
fileNamePDF = Dir$
Wend
Wend