473,503 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert Access 2003 Report to Acrobat 7.0

I found code online which uses Windows API's to save Access reports to
pdf format files. I'm using the full version of Adobe Acrobat
Professional 7.0. The problem is that regardless of what I put in the
code as a filename it automatically saves the report based on the
report name instead of the string passed to the registry key. The code
is as follows:

'************************************************* *****************
'Setting value for PDFFileName in the registry
'stops file dialog box from appearing

bSetRegValue HKEY_CURRENT_USER, "Software\Adobe\Acrobat PDFWriter",
"PDFFileName", sPDFPath + sPDFName
'************************************************* *****************

The line of code passes the correct string for path and filename to the
registry which gets written properly but Acrobat still saves the file
as "reportname.pdf", where the name of the Access report converted to
pdf is "reportname", regardless of what the registry key says. I can't
find anywhere in the Acrobat print settings to override this. Help,
please.

Nov 13 '05 #1
2 4343
BikeToWork wrote:
I found code online which uses Windows API's to save Access reports to
pdf format files. I'm using the full version of Adobe Acrobat
Professional 7.0. The problem is that regardless of what I put in the
code as a filename it automatically saves the report based on the
report name instead of the string passed to the registry key. The code
is as follows:

'************************************************* *****************
'Setting value for PDFFileName in the registry
'stops file dialog box from appearing

bSetRegValue HKEY_CURRENT_USER, "Software\Adobe\Acrobat PDFWriter",
"PDFFileName", sPDFPath + sPDFName
'************************************************* *****************

The line of code passes the correct string for path and filename to the
registry which gets written properly but Acrobat still saves the file
as "reportname.pdf", where the name of the Access report converted to
pdf is "reportname", regardless of what the registry key says. I can't
find anywhere in the Acrobat print settings to override this. Help,
please.


So what you need to do is figure out where these "reportname.pdf" files
get saved, and add more code to your function to rename it how you want
it to be renamed, like in the report's OnClose event handler.

I've installed PrimoPDF (the free version), but haven't tried to control
it programmatically.

Not much need for full Acrobat these days for most purposes, but if
you've got it, then by all means use it.

Nov 13 '05 #2
corey lawson wrote:
BikeToWork wrote:
I found code online which uses Windows API's to save Access reports to
pdf format files. I'm using the full version of Adobe Acrobat
Professional 7.0. The problem is that regardless of what I put in the
code as a filename it automatically saves the report based on the
report name instead of the string passed to the registry key. The code
is as follows:

'************************************************* *****************
'Setting value for PDFFileName in the registry
'stops file dialog box from appearing

bSetRegValue HKEY_CURRENT_USER, "Software\Adobe\Acrobat PDFWriter",
"PDFFileName", sPDFPath + sPDFName
'************************************************* *****************

The line of code passes the correct string for path and filename to the
registry which gets written properly but Acrobat still saves the file
as "reportname.pdf", where the name of the Access report converted to
pdf is "reportname", regardless of what the registry key says. I can't
find anywhere in the Acrobat print settings to override this. Help,
please.


So what you need to do is figure out where these "reportname.pdf" files
get saved, and add more code to your function to rename it how you want
it to be renamed, like in the report's OnClose event handler.

I've installed PrimoPDF (the free version), but haven't tried to control
it programmatically.

Not much need for full Acrobat these days for most purposes, but if
you've got it, then by all means use it.\


I agree I could make a function which changes the filenames for the
batch of reports to be processed but this same code worked fine in
Acrobat 5.0 and it is passing the proper data to the registry key so it
must be some "feature" of Acrobat 7.0 that always uses the name of the
original report as the filename, regardless of what is in the registry
key. Argh! How I hate overly "user-friendly" software...

Nov 13 '05 #3

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

Similar topics

2
2261
by: Avalanche | last post by:
Greetings all. I'm building a database (Access 2003) of applicants. Included in this database I would like to include the PDF applications for individuals in the database, accessable from a form...
15
13255
by: Mark C | last post by:
All, I have exhaustingly been looking through the newsgroups in search of a way to systemically output an Access 97 report to a pdf file using the full version of Adobe Acrobat. I want the user...
9
3136
by: Richard W Collens | last post by:
Hi Folks, Just wondering if there is any real need to convert an application from 2000 or XP to 2003, if the application is not going to grow or change. Ive had a couple people ask about it...
6
5255
by: jdph40 | last post by:
We recently had to upgrade the computers in our company. Now our office's website on our company intranet no longer recognizes reports saved in snapshot format. We get an error message that the...
12
5567
by: DGB | last post by:
Hello All, I have been doing quite a bit of research in this group and have not been able to find the answer that I am looking for. Here is my issue. We currently have Adobe Acrobat v5...
0
500
by: musicloverlch | last post by:
I used to be able to create PDFs, automatically save them to a file, and mail them out to people. This was on Access 97 with Windows NT. We've changed to Windows XP and Access 2003. Doesn't work...
3
3122
by: keithsimpson3973 | last post by:
I am trying to find a way to do the following I need to make a report (or datagrid, not sure which would be better) that can be printed. The format of the report is as follows: The first column...
1
6219
by: billelev | last post by:
Here is some code that I have adapted slightly. It allows a report to be printed to a specific location. It works by calling SaveReportAsPDF and specifying the access report name, and the root...
0
7198
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,...
0
7072
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
7319
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...
1
6979
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
5570
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,...
0
4666
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...
0
3160
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...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.