You are on page 1of 1

Dim objExcel, objWorkbook, strFile Set fs = WScript.CreateObject ("Scripting.

FileSystemObject") putanja = InputBox("Unesite putanju do Direktorijma") Sub ShowSubFolders(Folder) For Each Subfolder In Folder.SubFolders Set files = SubFolder.Files For Each file In files Set objExcel = CreateObject("Excel.Application") Set objWorkbook = objExcel.Workbooks.Open(file.Path) Set objSheet = objExcel.ActiveWorkbook.Worksheets(2) objSheet.PrintOut objExcel.ActiveWorkbook.Close objExcel.Application.Quit Next ShowSubFolders Subfolder Next End Sub ShowSubFolders fs.GetFolder(putanja)

You might also like