Adapter macro 2007/2010 pour mise en page
Bonjour à tous,
je travaille pour un client qui évolue sur Excel 2003, et comme il refuse que je fasse des tests sur son poste, je n'ai pas beaucoup de solutions possibles :/
Aussi, est-ce que quelqu'un parmi vous pourrait me donner l'équivalent du macro recorder sous Excel 2003 de la manipulation suivante :
-Définir la zone d'impression A1:J200
- ligne d'en-tête à garder 1:11
- format portrait
- 1 page max en largeur
- automatique en hauteur
Le code que j'ai actuellement sous 2007 mais qui ne passe pas sous la version 2003 du client :
Code:
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
| Application.PrintCommunication = False
With wbk.Sheets(Boucle).PageSetup
.PrintArea = wbk.Sheets(Boucle).Range("A1:J" & wbk.Sheets(Boucle).Range("A65536").End(xlUp).Row).Address
.PrintTitleRows = "$1:$11"
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = "&10&P/&N"
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
'.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 0 'automatique
.PrintErrors = xlPrintErrorsDisplayed
End With
Application.PrintCommunication = True |
Avec une erreur 438, erreur non gérée...
Merci par avance