By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,154 Members | 2,405 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,154 IT Pros & Developers. It's quick & easy.

Saving an Access Report In PDF Format with a different Name

P: n/a

I am using Acrobat 6.0. I am trying to save an Access report to a PDF
file using the Acrobat Distiller but came across an error message
“ActiveX component cannot create object –429”. I have tried all sorts of
things based on information that I got but not able to get rid of the

The code that I use is:

Dim ObjPDF as PDFDistiller

Application.Printer=Application.Printers("Adobe PDF")

Set ObjPDF = New PDFDistiller (It Fails Here)

ObjPDF.FileToPDF "ActualName","Custom Name",""

Set Application.Printer=Nothing

I have tried everything such as granting privileges to various locations
in the regitry and the hard disk but the error persists. I have made a
reference to the Acrodist.exe as well. Late Binding using CreateObject
fails too.

Please advise,

Pradeep Varma

*** Sent via Developersdex ***
May 10 '06 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Well, the best and simple approach is to dump the Acrobat.

You can use Stephens free code...

The advantage of the above.

** you do NOT have to install a printer driver.
** you do NOT have to try and change the printer, since we don't use
the pdf printer driver!!
** the solution posted is free, and you don't even have to install
pdf software on the target machine
to be able to create pdf files...saves you $$
** don't have to purchase Acrobat.....

To create a pdf file of your choice with stepahncs code, you go...

Call ConvertReportToPDF(strReportName, , strDocName, False, False)

Very easy to code.......

You can filter the report by opening it first..and THEN sending it useing

strPDFFile = "c:\pdfdata\OverDue.pdf"
strReportName = "rptCustomersOverDue"
DoCmd.OpenReport strReportName, acViewPreview, , strWhere
Reports(strReportName).Visible = False
Call ConvertReportToPDF(strReportName, , strDocName, False, False)

(hence, if the report is not open..the toPDF will open it for you...if you
need filtering..use it as 2nd example...

So, don't bother with all that printer driver crap...just use Stephens free
solution, and you don't even have to install a printer....

Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
May 10 '06 #2

P: n/a
Hello Albert,

Thanks very much for the suggestion. I did go to the link and downloaded
the required files and went through the code.

Interesting enough, I found 2 or 3 methods with which the coversion
process occurs successfully. But the matter of concern here is that I
cannot use any custom files like Dlls etc.

Adobe itself has quoted that in Acrobat 6.0 generating the reports in
PDF format is very easy and it hardly takes 4 to 5 lines.

When that is the case, why do we need to resort to alternative methods
other than instantiating the acrobat distiller. Some how a setting is
missing which is causing this error.

I have gone through many forums where the question is being posted but
no real responses to it. So i need to figure out the cause for the error
and that would resolve the issue.

(I have found in this forum itself that someone has a solution and he
quoted his email address as my*********
Please advise.


Pradeep Varma

*** Sent via Developersdex ***
May 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.