Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim c As Range, chemin$
Cancel = True 'pour tester sans imprimer, à supprimer pour imprimer
Set c = [D2]
If c Like "######/" & ActiveSheet.Name & "###" And Val(Left(c, 4)) = Year(Date) And Mid(c, 5, 2) = Format(Month(Date), "00") Then
c = Left(c, Len(c) - 3) & Format(Val(Right(c, 3)) + 1, "000")
Else
c = Year(Date) & Format(Month(Date), "00/") & ActiveSheet.Name & "001"
End If
chemin = ThisWorkbook.Path & "\" 'à adapter
Application.EnableEvents = False 'désactive les évènements
ActiveSheet.ExportAsFixedFormat xlTypePDF, chemin & Replace(c, "/", " ") 'le slash / est un caratère interdit
Application.EnableEvents = True 'réactive les évènements
End Sub