1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Option Explicit
Dim KeyWord,WshShell,fso,PDFFile
KeyWord = "serveur"
Set WshShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
For each PDFFile in FSO.GetFolder(Parcourir_Dossier()).Files
If (UCase(fso.GetExtensionName(PDFFile.Name))) = UCase("PDF") Then
WshShell.run "AcroRd32.exe /A ""zoom=50&navpanes=1=OpenActions&search="& KeyWord &" "" "& PDFFile &""
end if
Next
'****************************************************************************************************
Function Parcourir_Dossier()
Dim objShell,objFolder
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(0, "Veuillez choisir un dossier pour rechercher dans les fichiers en PDF ",1,"c:\Programs")
If objFolder Is Nothing Then Wscript.Quit
Parcourir_Dossier = objFolder.self.path
end Function
'**************************************************************************************************** |
Partager