Convertir un état d'access en PDF
MIMI
-
castours -
castours -
Bonjour,
je veux savoir comment faire un bouton du commande qui sert à convertir un état access en PDF. c'est a dire quand je clique sur le bouton. Il fait la convertition automatiquement d'état.
j'ai déja un code :
Sub CreerFichesInterlocuteurs()
Dim strFichier As String
Dim strFichierPDF As String
Dim strEtat As String
Dim strFiltre As String
Dim rst As dao.Recordset
' Nom de l'état à imprimer
strEtat = "rpt Personnes"
' Nom de base du fichier PDF à créer
strFichier = DossierSpecial(Bureau) & "\Test\Interlocuteur {0} - {1} {2}.pdf"
' Ouvrir la liste des personnes
Set rst = CurrentDb.OpenRecordset("tbl Destinataires", dbOpenSnapshot)
' Parcourir toute la liste
While Not rst.EOF
' Le nom du fichier varie en fonction de la personne
strFichierPDF = StringFormat(strFichier, _
Format(rst("id"), "000"), _
rst("Nom"), _
rst("Prénom"))
' Construire le filtre
strFiltre = "[id] = " & rst("id")
' Imprimer l'état en le filtrant sur la personne concernée
PrintAsPDF strFichierPDF, strEtat, strFiltre
' Personne suivante
rst.MoveNext
Wend
' Terminé !
rst.Close
Set rst = Nothing
MsgBox "Opération terminée !", vbInformation
End Sub
mais il fait la convertition soontbouton est moi je veux un bouton
je veux savoir comment faire un bouton du commande qui sert à convertir un état access en PDF. c'est a dire quand je clique sur le bouton. Il fait la convertition automatiquement d'état.
j'ai déja un code :
Sub CreerFichesInterlocuteurs()
Dim strFichier As String
Dim strFichierPDF As String
Dim strEtat As String
Dim strFiltre As String
Dim rst As dao.Recordset
' Nom de l'état à imprimer
strEtat = "rpt Personnes"
' Nom de base du fichier PDF à créer
strFichier = DossierSpecial(Bureau) & "\Test\Interlocuteur {0} - {1} {2}.pdf"
' Ouvrir la liste des personnes
Set rst = CurrentDb.OpenRecordset("tbl Destinataires", dbOpenSnapshot)
' Parcourir toute la liste
While Not rst.EOF
' Le nom du fichier varie en fonction de la personne
strFichierPDF = StringFormat(strFichier, _
Format(rst("id"), "000"), _
rst("Nom"), _
rst("Prénom"))
' Construire le filtre
strFiltre = "[id] = " & rst("id")
' Imprimer l'état en le filtrant sur la personne concernée
PrintAsPDF strFichierPDF, strEtat, strFiltre
' Personne suivante
rst.MoveNext
Wend
' Terminé !
rst.Close
Set rst = Nothing
MsgBox "Opération terminée !", vbInformation
End Sub
mais il fait la convertition soontbouton est moi je veux un bouton
A voir également:
- Convert a calameo file to a pdf
- Lire le coran en français pdf - Télécharger - Histoire & Religion
- Calameo to pdf - Forum PDF
- Télécharger un document Calaméo ✓ - Forum Liseuse eBook
- Comment télécharger un fichier PDF Calameo ✓ - Forum Liseuse eBook
- Télécharger un PDF Calameo - Forum Liseuse eBook