Hola,
Cuando usaba una versión de PdfCreator anterior a la versión v3.4.0. Build 5156 yo no tenía ningún problema para utilizar la siguiente función con mi código VBA en Excel (previo registro de la biblioteca PDFCreator.COM.tlb):
[in Engllish]
When using a version of PdfCreator earlier than version v3.4.0. Build 5156 I had no problem using the following function with my VBA code in Excel (previous registration of the PDFCreator.COM.tlb library):
' PDFCreator COM Interface test for VBA
' Part of the PDFCreator application
'License: GPL
' Homepage: http://www.pdfforge.org/pdfcreator
' Version: 1.0.0.0
' Created: June, 16. 2015
' Modified: June, 16. 2015
'Author: Sazan Hoti
' Comments: This project demonstrates the use of the COM Interface of PDFCreator.
' There are 5 different kinds of usage presented.
' Note: More usage examples then in the VBA directory can be found in the JavaScript directory only.
' IMPORTANT: Set a reference to the pdfcreator.tlb!
Public Sub PrintToPDF(ByVal hoja As String, ByVal sPDFName As String)
_ Dim fullPath_
_ Dim PDFCreatorQueue As Queue_
_ Dim pJob As PrintJob_
_ Set PDFCreatorQueue = CreateObject("PDFCreator.JobQueue")_
_ fullPath = ActiveWorkbook.Path & "" & sPDFName & hoja_
_ 'MsgBox "Initializing PDFCreator queue..."_
_ PDFCreatorQueue.Initialize_
_ 'Set printer if necessary_
_ Application.ActivePrinter = "PDFCreator en Ne00:"_
_ 'MsgBox "Printing the current active document..."_
_ ActiveWorkbook.Sheets(hoja).PrintOut 'Background:=False_
_ 'MsgBox "Waiting for the job to arrive at the queue..."_
_ If Not PDFCreatorQueue.WaitForJob(10) Then_
_ 'MsgBox "The print job did not reach the queue within " & " 10 seconds"_
_ Else_
_ 'MsgBox "Currently there are " & PDFCreatorQueue.Count & " job(s) in the queue"_
_ 'MsgBox "Getting job instance"_
_ Set pJob = PDFCreatorQueue.NextJob_
_ pJob.SetProfileByGuid ("DefaultGuid")_
_ 'MsgBox "Converting under ""DefaultGuid"" conversion profile"_
_ pJob.ConvertTo (fullPath)_
_ If (Not pJob.IsFinished Or Not pJob.IsSuccessful) Then_
_ 'MsgBox "Could not convert the file: " & fullPath_
_ Else_
_ 'MsgBox "Job finished successfully"_
_ End If_
_ End If_
_ 'MsgBox "Releasing the object"_
_ PDFCreatorQueue.ReleaseCom_
End Sub
pero después de actualizar a la versión v3.4.0. Build 5156 ya no puedo utilizarlo porque la biblioteca PDFCreator.COM.tlb ya no se encuentra disponible.
¿Cómo puedo hacer para utilizar este código (u otro similar) con la nueva versión 3.4.0?
[In English]
but after updating to version v3.4.0. Build 5156 I can no longer use that code because the PDFCreator.COM.tlb library is no longer available.
How can I use this code (or similar) with the new version 3.4.0?
Thanks