Bonjour
voila une macro pour imprimer en PDF
a voir si ca te va
A+
Maurice
Sub Imprimer()
Dim N&
N = InputBox("Saisissez le nombre de copies d?sir?es :", "Nombre de copies", 1)
If IsNumeric(N) Then
Choix N
Else
MsgBox "Saisie incorrecte.", 16
Exit Sub
End If
End Sub
Sub Choix(N)
Dim Chemin$, NomDoc$, NomFiche$
Dim C&
'Sheets("Stat").Select
With ActiveSheet.PageSetup
.PrintArea = "$B$6:$F$28"
.CenterHorizontally = True
.Orientation = xlPortrait ' Portrait
.PaperSize = xlPaperA4 'Format papier
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.BlackAndWhite = False ' Couleur
End With
Chemin = ThisWorkbook.Path & "\"
NomDoc = "Facture"
For C = 1 To N
NomFiche = Chemin & NomDoc & C & Format(Now, "-dd-mmmm-yyyy") & ".pdf"
Call EditionPDF(NomFiche)
Next
MsgBox "Edition Terminer"
End Sub
Sub EditionPDF(NomFiche)
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=NomFiche, _
Quality:=xlQualityMinimum, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub