1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
Sheets("Production").Select
If (imp_prod) Then
Range("Production!B1:N" & Ind_Prod).Select
ActiveSheet.PageSetup.PrintArea = "$B$1:$T" & Ind_Prod
With ActiveSheet.PageSetup
.LeftMargin = 0.8
.RightMargin = 0.7
.TopMargin = 2.5
.BottomMargin = 2.5
'.HeaderMargin =
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = True
.Orientation = xlLandscape
.PaperSize = xlPaperLetter
.Zoom = 80
.PrintErrors = xlPrintErrorsDisplayed
End With
If (imp_pdf) Then
oldPrinter = Application.ActivePrinter
Application.ActivePrinter = "Adobe PDF sur Ne01:"
myPath = "C:\"
myFilename = NomFichierSom & "Prod"
ActiveWindow.SelectedSheets.PrintOut ActivePrinter:="Adobe PDF sur Ne01:"
Application.ActivePrinter = oldPrinter
End If
'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
Sheets("SommaireMat").Select
If (imp_prod) Then
Range("SommaireMat!B1:E" & Ind_Prod2).Select
ActiveSheet.PageSetup.PrintArea = "$B$1:$E" & Ind_Prod2
With ActiveSheet.PageSetup
.LeftMargin = 0.8
.RightMargin = 0.7
.TopMargin = 2.5
.BottomMargin = 2.5
'.HeaderMargin =
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = True
.Orientation = xlPortrait
.PaperSize = xlPaperLetter
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
If (imp_pdf) Then
oldPrinter = Application.ActivePrinter
Application.ActivePrinter = "Adobe PDF sur Ne01:"
myPath = "C:\"
myFilename = NomFichierSom & "SommMAt"
'ActiveWindow.SelectedSheets.PrintOut PrtoFileName:=myPath & myFilename & ".ps", PrintToFile:=True
Application.ActivePrinter = oldPrinter
End If |
Partager