473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Saving an Access Report In PDF Format with a different Name

Hi,

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
same.

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 http://www.developersdex.com ***
May 10 '06 #1
2 2081
Well, the best and simple approach is to dump the Acrobat.

You can use Stephens free code...
http://www.lebans.com/reporttopdf.htm

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
the pdf...like

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

(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....

http://www.lebans.com/reporttopdf.htm

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.members.shaw.ca/AlbertKallal
May 10 '06 #2
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*********@mylastname.com)
Please advise.

Thanks,

Pradeep Varma

*** Sent via Developersdex http://www.developersdex.com ***
May 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
1
by: Wayne | last post by:
I'm trying to save a report as a snapshot. If I use this code: DoCmd.OutputTo acOutputReport, "Snapshot Format (*.snp)", , False everything works fine, the file save dialogue box appears and...
1
by: PALLAVI SHARMA | last post by:
Sir, i have configure the ms access file on webserver. MS. Access file is showing in .../db/mohan.mdb on web server. could you tell me what path should in write in my language to update the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.