473,795 Members | 3,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Pri nter=Applicatio n.Printers("Ado be PDF")

Set ObjPDF = New PDFDistiller (It Fails Here)

ObjPDF.FileToPD F "ActualName","C ustom Name",""

Set Application.Pri nter=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 2114
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 ConvertReportTo PDF(strReportNa me, , 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\Ove rDue.pdf"
strReportName = "rptCustomersOv erDue"
DoCmd.OpenRepor t strReportName, acViewPreview, , strWhere
Reports(strRepo rtName).Visible = False
Call ConvertReportTo PDF(strReportNa me, , strDocName, False, False)
reprots(strRepr otName).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*********@myl astname.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
8873
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 want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
11
6603
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 where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
1
5506
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 the "Report's Name.snp" is entered as the file name to be saved and the file can be saved to the specified location. If however I try to give the report a different name by entering an object name like this:
1
2582
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 database.. Can i repalce the the database on webserver whild drectly copy and paste method... will it work kindly help me
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10435
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9037
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.