Add reference to access 2016


#1

I seem to be having a bit of trouble getting the reference to link properly.
I have added as reference pdfCreator.COM.tlb but it doesnt seem to work.
Some people online have said that I should add as a reference the .dll or even the .exe but access prevetns me from adding those as reference.

Here is the code I use to test if it is linked properly

Dim oPDFJob As Object

On Error GoTo L_ErrIsPDFCReatorInstalled
Set oPDFJob = CreateObject("PDFCreator.clsPDFCreator")
IsPDFCreatorInstalled = (Not oPDFJob Is Nothing)
On Error GoTo 0

L_ExIsPDFCReatorInstalled:
Set oPDFJob = Nothing
Exit Function

L_ErrIsPDFCReatorInstalled:
Resume L_ExIsPDFCReatorInstalled

End Function

Private Sub Détail_Click()

If IsPDFCreatorInstalled = False Then
MsgBox Err.Description, vbDefaultButton1, “Don goofed up”
Else
MsgBox Err.Description, vbDefaultButton1, “ya did good”
End If
End Sub


#2

Hi,

which version of PDFCreator do you have installed? Referencing the tlb is correct, but PDFCreator.clsPDFCreator last existed in PDFCreator 1.7.3, the entire application and interface have been completely rewritten since:
http://docs.pdfforge.org/pdfcreator/3.0/en/pdfcreator/com-interface

Best regards

Robin


#3

I downloaded the lasted one on the site.