[VBA-EXCEL] Application.FileSearch
Bonjour je recherche tous les *.sql qui ont dans le corps du text la phrase suivante
Code:
CREATE PUBLIC SYNONYM
J'ai donc codé l'exemple suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| With Application.FileSearch
.NewSearch
.LookIn = strPath
.SearchSubFolders = False
.FileName = "*.sql"
.FileType = msoFileTypeAllFiles
.TextOrProperty = "CREATE*PUBLIC*SYNONYM"
.MatchTextExactly = False
If varrtn > 0 Then
For i = 1 To .FoundFiles.Count
strRtn = strRtn & ";" & .FoundFiles(i)
Next
strRtn = .FoundFiles.Count & " Trouvés ;" & strRtn
Else
strRtn = "Execute>0"
End If
End With |
Par contre, il trouve rien. :cry:
Cependant si je remplace
Code:
.TextOrProperty = "CREATE*PUBLIC*SYNONYM"
par
Code:
.TextOrProperty = "CREATE*"
Il trouve des résultats. :aie:
kk1 sait comment rechercher plusieurs mot séparé par n'importe quelle chaine de caractère ??
Merci d'avance