Bonjour,
Je souhaite imprimer un planning format paysage. Avec mon code la dernière colonne du tableau est situé à environ 5 cm du bord droit de la feuille alors que j'aimerais qu'elle se termine à 1 cm du bord.
Voici mon code :
Sub Site()
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
'définition de la zone d'impression
ActiveSheet.PageSetup.PrintArea = "$A$1:$L$40"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = "Programme Planning"
.CenterFooter = "Mise à jour le &D"
.RightFooter = "Page &P"
.LeftMargin = Application.InchesToPoints(0.61)
.RightMargin = Application.InchesToPoints(0.62)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.83)
.HeaderMargin = Application.InchesToPoints(0.34)
.FooterMargin = Application.InchesToPoints(0.4921259845)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600 'niveau de qualité de l'impression
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape 'format paysage
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
'affiche le tableau sur une page en largeur.. défini manuellement par test
.Zoom = 57
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub
Merci de m'aider
Je souhaite imprimer un planning format paysage. Avec mon code la dernière colonne du tableau est situé à environ 5 cm du bord droit de la feuille alors que j'aimerais qu'elle se termine à 1 cm du bord.
Voici mon code :
Sub Site()
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
'définition de la zone d'impression
ActiveSheet.PageSetup.PrintArea = "$A$1:$L$40"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = "Programme Planning"
.CenterFooter = "Mise à jour le &D"
.RightFooter = "Page &P"
.LeftMargin = Application.InchesToPoints(0.61)
.RightMargin = Application.InchesToPoints(0.62)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.83)
.HeaderMargin = Application.InchesToPoints(0.34)
.FooterMargin = Application.InchesToPoints(0.4921259845)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600 'niveau de qualité de l'impression
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape 'format paysage
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
'affiche le tableau sur une page en largeur.. défini manuellement par test
.Zoom = 57
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub
Merci de m'aider