Impression excel en pdf avec macro VBA

simdup Messages postés 13 Date d'inscription   Statut Membre Dernière intervention   -  
simdup Messages postés 13 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,
Je cherche si quelqu'un aurait une solution à mon problème. J'ai crée un macro qui imprime mon fichier excel. J'aimerais si c'est possible en crée une identique mais qui "imprime" en pdf.
voici ma macro :

Public Sub Imprime()

ActiveSheet.Range("A1:AH126").PrintOut

If Cells(4, 49) <> 0 Then
ActiveSheet.Range("A127:AH189").PrintOut
End If
If Cells(5, 49) <> 0 Then
ActiveSheet.Range("A190:AH253").PrintOut
End If
If Cells(6, 49) <> 0 Then
ActiveSheet.Range("A254: AH316 ").PrintOut
End If
If Cells(7, 49) <> 0 Then
ActiveSheet.Range("A317: AH380 ").PrintOut
End If
If Cells(8, 49) <> 0 Then
ActiveSheet.Range("A381: AH443 ").PrintOut
End If

End Sub

Si quelqu'un à la réponse à ma question je le remercie déjà à l'avance

Bonne journée le forum

A voir également:

5 réponses

PlacageGranby Messages postés 393 Date d'inscription   Statut Membre Dernière intervention   26
 
hmm...

On imprime sur du papier, mais on enregistre sous format PDF.

Je ne comprend pas ta question, pourrais-tu clarifier si tu veux imprimer ou enregistrer.
0
simdup Messages postés 13 Date d'inscription   Statut Membre Dernière intervention  
 
Oui pardon pour cet abus de language, je veux en effet enregistré mon fichier en pdf.
0