Problème mavro impression

Bonjour ,

J'aurais besoin de votre aide, j'ai une macro pour imprimé mais elle fonctionne mal. Des fois elle va fonctionner à la première impression est des fois non et quand je fais plusieurs impression à la suite les deux ou trois premières fonctionne et les autres sont soit a gauche de la page ou en zoom 100%

voici ma macro et en pièce jointe le résultat que je veux.

En vous remerciant de votre aide.

Sub IMPRESSION_VISITE_VTC_P4() ' Impression des prochaines visites pour les feuilles des VTC P4.

Dim x As Long

Dim Reponse1 As Long

Dim Reponse2 As Long

Reponse1 = MsgBox("Etes-vous sûr de vouloir imprimer ?", vbQuestion + vbYesNo) 'Impression ou non de la fiche des prochaines visites.

If Reponse1 = vbYes Then

With ActiveSheet.PageSetup

.FitToPagesTall = 1

.FitToPagesWide = 1

x = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row 'Recherche la dernière ligne(x) utilisée dans la colonne A.

ActiveSheet.Range("A23:E" & x).Select 'Selection les cellules comprises entre A23 et Ex.

Selection.PrintOut Copies:=1, Collate:=True 'Impression de la selection réalisée.

End With

Application.PrintCommunication = True

ActiveSheet.PageSetup.PrintArea = ""

Application.PrintCommunication = False

With ActiveSheet.PageSetup

.LeftHeader = ""

.CenterHeader = ""

.RightHeader = ""

.LeftFooter = ""

.CenterFooter = ""

.RightFooter = ""

.LeftMargin = Application.InchesToPoints(5.90551181102362)

.RightMargin = Application.InchesToPoints(0.196850393700787)

.TopMargin = Application.InchesToPoints(0.590551181102362)

.BottomMargin = Application.InchesToPoints(0.196850393700787)

.HeaderMargin = Application.InchesToPoints(0.196850393700787)

.FooterMargin = Application.InchesToPoints(0.196850393700787)

.PrintHeadings = False

.PrintGridlines = False

.PrintComments = xlPrintNoComments

.PrintQuality = 600

.CenterHorizontally = False

.CenterVertically = False

.Orientation = xlLandscape

.Draft = False

.PaperSize = xlPaperA4

.FirstPageNumber = xlAutomatic

.Order = xlDownThenOver

.BlackAndWhite = False

.Zoom = 60

.PrintErrors = xlPrintErrorsDisplayed

.OddAndEvenPagesHeaderFooter = False

.DifferentFirstPageHeaderFooter = False

.ScaleWithDocHeaderFooter = True

.AlignMarginsHeaderFooter = True

.EvenPage.LeftHeader.Text = ""

.EvenPage.CenterHeader.Text = ""

.EvenPage.RightHeader.Text = ""

.EvenPage.LeftFooter.Text = ""

.EvenPage.CenterFooter.Text = ""

.EvenPage.RightFooter.Text = ""

.FirstPage.LeftHeader.Text = ""

.FirstPage.CenterHeader.Text = ""

.FirstPage.RightHeader.Text = ""

.FirstPage.LeftFooter.Text = ""

.FirstPage.CenterFooter.Text = ""

.FirstPage.RightFooter.Text = ""

End With

End If

End Sub

Bonjour

Une photo c'est beau, mais un fichier c'est beaucoup mieux pour bosser

Crdlt

Bonjour JOCO7915,

Désolé, ci joint quelques feuilles du fichier originel

Rechercher des sujets similaires à "probleme mavro impression"