Gruppe
Druck
Problem
Wie kann ich über VBA alle Arbeitsmappen eines Ordners ausdrucken lassen?
StandardModule: basMain
Sub AlleDrucken()
Dim iCounter As Integer
Application.ScreenUpdating = False
Application.EnableEvents = False
On Error GoTo ERRORHANDLER
With Application.FileSearch
.LookIn = Range("B1").Value
.FileType = msoFileTypeExcelWorkbooks
.Execute
For iCounter = 1 To .FoundFiles.Count
Workbooks.Open .FoundFiles(iCounter), False
ActiveWorkbook.PrintOut
ActiveWorkbook.Close savechanges:=False
Next iCounter
End With
ERRORHANDLER:
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub