Sub PrintAllebestanden()
With ActiveWorkbook
.SaveAs "\\flsrv-01\Autocad\Collstrop\Offertes\2008\" & Range("B7").Text & "\" & Range("B7").Text & "_" & Range("A1")
For Each sh In .Sheets
With sh
Select Case .Name
Case "Uithaallijst"
.PageSetup.PrintArea = "$A$2:$F$43"
Select Case .Range("R7").Value
Case 0 'nederlands
.PrintOut 2
.Range("A6:A26").Font.ColorIndex = 2
.PageSetup.PrintArea = "$A$1:$F$43"
.PrintOut 1
.Range("A6:A26").Font.ColorIndex = 1
Case 1 'frans
Sheets("START").Range("R7").FormulaR1C1 = "0"
.PrintOut 2
Sheets("START").Range("R7").FormulaR1C1 = "1"
With .Range("A6:A26").Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
.PageSetup.PrintArea = "$A$1:$F$43"
.PrintOut 1
With .Range("A6:A26").Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
End Select
Case "Rail", "Beslag - In Beton", "Plaatsing - In Beton", "Beslag - Op Beton", "Plaatsing - Op Beton", "Montage beslag", "Devos", "MD10213", "MD10218", "MD10219", "MD10220", "MD10221", "MD10222", "Came", "Nestor"
.PrintOut 2
Case "Productie fiche"
.PrintOut 1
End Select
End With
Next
Sheets(Choose(Sheets(1).Range("R5"), "In Beton", "Op Beton") & Choose(Sheets(1).Range("R6"), " - Manueel", "- Automatisatie")).Copy ActiveWorkbook
For Each fl In CreateObject("scripting.filesystemobject").getfolder("\\Flsrv-01\Bestellingen TD\2008\Collstrop\Bestellingen").Files
c0 = c0 & "|" & fl.Name
Next
.SaveAs "\\Flsrv-01\Bestellingen TD\2008\Collstrop\Bestellingen\BE08" & Format(UBound(Filter(Filter(Split(c0, "|"), ".xls"), "BE08")) - 13, "0000") & "_" & "Devos" & ".xlsx"
.SaveAs "\\Flsrv-01\Bestellingen TD\2008\Collstrop\Bestellingen\BE08" & Format(UBound(Filter(Filter(Split(c0, "|"), ".xls"), "BE08")) - 13, "0000") & "_" & "Nestor" & ".xlsx"
.SaveAs "\\Flsrv-01\Bestellingen TD\2008\Collstrop\Bestellingen\BE08" & Format(UBound(Filter(Filter(Split(c0, "|"), ".xls"), "BE08")) - 13, "0000") & "_" & "Came" & ".xlsx"
.Close False
MsgBox "De opgeslagen bestellingen staan in: " & "\\Flsrv-01\Bestellingen TD\2008\Collstrop\Bestellingen"
End Sub