I'm trying to modify an Excel 2003 macro that will open a workbook in a folder, print it, close that workbook, open another one and keep printing and closing workbooks in the folder until they're all printed. I know I can no longer use "Set fs = Application.FileSearch" in Excel 2010, but I don't know or understand the alternatives. The macro I used before the change to 2010 is listed below. I would appreciate it if someone could show me how to replace the "Set fs = Application.FileSearch" with the new and accepted alternative. Thanks in advance! JPDutch
Sub Print3()
'
' MacroGRP2 Macro
' Macro recorded 01/06/2012 by jpdutch
'
' This starts the print job
Dim fs As FileSearch
Dim i As Integer
Dim wbk As Workbook
Set fs = Application.FileSearch
With fs
.LookIn = ThisWorkbook.Path
.Filename = "*.xls"
For i = 200 To .Execute()
Set wbk = Workbooks.Open(.FoundFiles(i))
' This will print the document
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
' Wait
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 7
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
wbk.Close SaveChanges:=True
Next i
End With
End Sub
Bookmarks