Bug and workaround after upgrading to new Version 1.2.1

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!

 So curious.

Thanks, I've an similar behaviour.

This is not really a pdfcreator problem.  It has to do with Microsoft and changes they have made.  There is a fix (patch) that has been released.  Basically the problem occurs if you compile a program on a Win7/Vista computer and run that on a Win XP computer or vise-versa.  Do a google search on 430 Automation error.  MS have known about the problem for a year now, but it got something to do with changing pointers from 32 bit to the new 64 bit.

What ORNSTEIN said will work but only as long as the computer you are putting the program on is the same OS.