In diesem Beispiel wird die NewSearch-Methode verwendet, um vor dem Start einer neuen Suche die Suchkriterien auf die Standardeinstellungen zurückzusetzen.
With Application.FileSearch .NewSearch .LookIn = "C:\My Documents" .SearchSubFolders = True .FileName = "run" .TextOrProperty = "San*" .MatchAllWordForms = True .FileType = msoFileTypeAllFiles If .Execute() > 0 Then MsgBox "There were " & .FoundFiles.Count & _ " file(s) found." For i = 1 To .FoundFiles.Count MsgBox .FoundFiles(i) Next i Else MsgBox "There were no files found." End If End With