Hello all,
Hope this is useful for someone besides me. I use PDFCreator from within Access2007 as an automation tool for creating invoices. After upgrading to V 1.2.1, I had a problem I also had last time I upgraded to the previous version. An action that had worked perfectly before, now yielded an error.
Error message: "430 Class does not support Automation or does not support expected interface"
Code (workaround below):
'Start PFF Creator
[error occurs here immediately when calling PDFJOB]
Set pdfjob = New PDFCreator.clsPDFCreator
With pdfjob
If .cStart("/NoProcessingAtStartup") = False Then
MsgBox "Can't initialize PDFCreator.", vbCritical + _
vbOKOnly, "PrtPDFCreator"
Exit Sub
End If
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveFilename") = sPDFName
.cOption("AutosaveFormat") = 0 ' 0 = PDF
.cClearCache
End With
'Print the document to PDF
Application.DoCmd.SelectObject ObjectType:=acReport, _
ObjectName:=sReportName, InDatabaseWindow:=True
DoCmd.OpenReport sReportName, , , rptCrit, , rptOpenArgs
Workaround: Re-reference PDFCreator as follows:
1) Open some module in VBA project for your database
2) Select Tools-->References from the menu
3) Find PDFCreator in the list of referenced libraries. UNCHECK IT.
4) Click OK.
5) Compile your database. This will now yield a compile error.
6) Again select Tools-->References from the menu
7) Find PDFCreator in the list of unreferenced libraries. CHECK IT.
8) Compile again
9) Problem solved!