Bonjour,
Je voudrais créer une macro qui va faire exporter une feuille d'excel en PDF et qui aura les propriétés suivantes:
1) Type de feuille: A3
2) Qui prend la supercifie de la feuille maximale (donc la plus petite marge possible)
Cependant, ce bout de code m'indique une erreur: ".PaperSize = xlPaperA3"
Auriez-vous une idée pourquoi?
Merci!
Cordialement.
Sub Exporter_PDF()
With ActiveSheet.PageSetup
.CenterHeader = ""
.Orientation = xlPortrait
.PrintArea = "B1:L88"
'.PrintTitleRows = ActiveSheet.Rows(5).Address
.Zoom = False
.PaperSize = xlPaperA3
.PrintHeadings = False
.LeftMargin = Application.CentimetersToPoints(0.5)
.RightMargin = Application.CentimetersToPoints(0.5)
.TopMargin = Application.CentimetersToPoints(0.5)
.BottomMargin = Application.CentimetersToPoints(0.5)
.HeaderMargin = Application.CentimetersToPoints(0.1)
.FooterMargin = Application.CentimetersToPoints(0.1)
.FitToPagesTall = 1
.FitToPagesWide = 1
End With
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Range("D4").Value _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
End Sub