home *** CD-ROM | disk | FTP | other *** search
- ordner=inputbox("Hier Pfad angeben:","Dateisuche")
- If ordner="" Then ordner="C:\"
- DateiFilter=ucase(inputbox("Filter angeben (z. B. XLS)","Dateisuche"))
- If DateiFilter="" Then DateiFilter="DOC"
-
- Set ie4=CreateObject("InternetExplorer.Application")
- ie4.navigate ("about:blank")
- ie4.visible=1
-
- Set FSys=CreateObject("Scripting.FileSystemObject")
- Set TheFolder = FSys.GetFolder(Ordner)
- ie4.document.body.innerHTML="<p id='idOutput'>"
-
- SubFolders TheFolder, DateiFilter
- YesNo=MsgBox("Ausdrucken?", vbYesNo)
- If YesNo = vbYes Then ie4.ExecWB 6, 2
- Set ie4=nothing
- Set fSys=nothing
-
- Sub SubFolders(ByVal AFolder, TheExtension)
- strOut="<b>" & AFolder & "</b><br>"
- ie4.document.all.idOutput.insertAdjacentHTML "BeforeEnd", strOut
- ShowFilesWithExtensionIn AFolder, TheExtension
- Set MoreFolders = AFolder.SubFolders
- For Each TempFolder In MoreFolders
- SubFolders TempFolder, TheExtension
- Next
- End Sub
-
- Sub ShowFilesWithExtensionIn(AFolder,TheExtension)
- header="<H1>Inhalt von: " & folderspec & "</H1> <p>"
- Set TheFiles = AFolder.Files
-
- For Each AFile In TheFiles
- If UCase(FSys.GetExtensionName(AFile.Path)) = TheExtension Then
- s=ucase(AFile.Path)
- s = s & "<br>"
- ie4.document.all.idOutput.insertAdjacentHTML "BeforeEnd", s
- End If
- Next
- End Sub
-
-
-