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
| Set pdfc = New clsPDFCreator
With pdfc
.cStart "/NoProcessingAtStartup"
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
strDirectory = "c:\temp\Bilan\"
.cOption("AutosaveDirectory") = strDirectory
stPDFName = Numéro_Attestation
.cOption("AutosaveFilename") = stPDFName
' Format de sauvegarde (0 = PDF)
.cOption("AutosaveFormat") = 0
' Mémoriser l'imprimante par défaut
' et définir PDFCreator à la place
DefaultPrinter = .cDefaultPrinter
.cDefaultPrinter = "PDFCreator"
.cClearCache
' Imprimer l'état
strReportName = "Attestation5"
DoCmd.OpenReport strReportName, acViewNormal, , , , varAsplitter
.cPrinterStop = False
End With |
Partager