Access impression automatique en PDF

Bonjour,

J'ai pu voir sur plusieurs forum qu'il était possible de directement imprimer en PDF un etat sur access.

Je suis fortement interresse.

J'ai notamment pu sortir ce genre de code:

Malheureusement étant novice je ne sais pas où l'encoder, mon but étant de créer un bouton qui après click me permettrait de lancer directement l'impression PDF via pdf créator si besoin

Merci à vous!!

1 réponse

  • Votes
  • Date
  • Date décroissante
  1. Bonjour,

    Ce petit morceau de code marche a merveille.

    Nom du bouton a modifier

    Private Sub Commande3_Click() 
       
      'obelix199 replied on 16-Mar-09 01:04 PM 
      ' Change l'imprimante par defaut 
      ' ------------------------------ 
      ' 
      NomImprimanteApres = "PdfCreator" 
      Shell ("c:\windows\system32\rundll32 printui.dll,PrintUIEntry /y /n " + Chr(34) + NomImprimanteApres + Chr(34)) 
    
      'Impression de l'etat: changez le nom 
      DoCmd.OpenReport "TCom", acViewNormal 
    
      ' Remet l'imprimante par defaut, voir dans Imprimantes et telecopieurs 
      ' ----------------------------- 
      NomImprimanteAvant = "Nom de l'imprimante normale" 
      Shell ("c:\windows\system32\rundll32 printui.dll,PrintUIEntry /y /n " + Chr(34) + NomImprimanteAvant + Chr(34)) 
    
    End Sub 
    


    Bonne suite