Bjr,
j'ai le même pb depuis passage en 1.5.0.
J'utilise le code suivant!
sPDFName = "testPDF.pdf"
sPDFPath = ActiveWorkbook.Path & Application.PathSeparator
Do
bRestart = False
Set pdfjob = New PDFCreator.clsPDFCreator
If pdfjob.cStart("/NoProcessingAtStartup") = False Then
'PDF Creator is already running. Kill the existing process
Shell "taskkill /f /im PDFCreator.exe", vbHide
DoEvents
Set pdfjob = Nothing
bRestart = True
End If
Loop Until bRestart = False
'Assign settings for PDF job
With pdfjob
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveFilename") = sPDFName
.cOption("AutosaveFormat") = 0 ' 0 = PDF
.cDefaultPrinter = "PDFCreator"
.cOption("EditWithPDFArchitect") = 0
.cOption("OpenOutputFile") = 0
.cClearCache
End With
'Delete the PDF if it already exists
If Dir(sPDFPath & sPDFName) = sPDFName Then Kill (sPDFPath & sPDFName)
'Print the document to PDF
ActiveSheet.PrintOut copies:=1 ', ActivePrinter:="PDFCreator"
'Wait until the print job has entered the print queue
Do Until pdfjob.cCountOfPrintjobs = 1
DoEvents
Loop
--> et en fait, pdfjob.cCountOfPrintjobs est toujours égal à 0 donc il reste dans la boucle.
Pourtant quand je vais voir dans le répertoire PDFCreator\\, j'ai bien quelque chose, mais rien qui apparait dans les travaux en attente.
Et dans le menu imprimante de pdfcreator, "Arrêt" est coché.
J'ai essayé de réinstaller plusieurs versions précédentes, sans succès.
Plusieurs redémarrage après installation, rien n'y fait.
Par contre, si je fais une impression manuelle vers l'imprimante PDFCreator, même problème. Il faut que je réinitialise les options par défaut dans PDFCreator pour pouvoir à nouveau imprimer manuellement vers PDFCreator.
Configuration:
Poste XP SP3
Ghostscript intégré : GPL Ghostscript 9.05
Merci d'avance de votre aide...