Sub RequeteWindowsDesktopSearch()
'Dans VBA Menu "Tools/References..."
'Cocher "Microsoft ActiveX Data Object 2.8 Library"
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordset = CreateObject("ADODB.Recordset")
objConnection.Open "Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"
'requette : ensemble des fichiers Excel du bureau
objRecordset.Open "SELECT System.FileName,System.ItemFolderPathDisplay FROM SYSTEMINDEX WHERE System.ItemFolderPathDisplay = 'C:\Utilisateurs\UserName\Desktop' AND System.ItemNameDisplay LIKE '%.xls%'", objConnection
If objRecordset.RecordCount <> 0 Then
objRecordset.MoveFirst
Do While Not objRecordset.EOF
For i = 0 To 1
Debug.Print objRecordset(i)
Next i
objRecordset.MoveNext
Loop
End If
objConnection.Close
End Sub