PDF Creation with EXCEL 2002 -> ErrorCode 1004

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
Posts: 1
Joined: Tue Dec 28 2004

PDF Creation with EXCEL 2002 -> ErrorCode 1004

Post by Andi » Wed Dec 29 2004


I want to create a PDF File from EXCEL with the following VBA-Script:

Sub doPrint()
Dim PDF As New CDIntfEx.CDIntfEx

With PDF
.DriverInit ("Amyuni PDF Converter")
.DefaultFileName = "C:\temp\test.PDF"
.FileNameOptions = 3


End With

End Sub

I allways get the error message 1004 (German: Fehler beim Ausdruck auf PDF Converter...).

If I print the EXCEL sheet first manually to the PDF converter, then my script also works.

When I use this script in ACCESS, then I've also no problems.

Our software versions:
Windows 2000 SP4
EXCEL 2002 SP3 (Office XP SP3)
PDF Converter 2.10a

My script doesn't work on alle company pcs.

I hope somebody can help me

Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002

Post by Joan » Wed Jan 05 2005


Are you calling EnablePrinter() when catching the EnablePre() event generated by the driver?

If not please call EnablePrinter() right beforecalling:

Please note that 2.10a is relatively a little bit old. Our latest version is 2.10i-8, if you have a maintenance plan please feel free to download the latest version from: http://www.amyuni.com/en/support/updates.html

Hope this helps.

Post Reply