Adobe PDF printer - Use VBA?? (1 Viewer)

boblarson

Smeghead
Local time
Yesterday, 18:27
Joined
Jan 12, 2001
Messages
32,059
I also posted this to the Adobe forums but thought I would do so here:

------------------------------------------------------
I am using Microsoft Access 2003 and have Acrobat 7 (Adobe PDF) and Acrobat 5 (Adobe PDF Writer) installed on my machine. I can print to the Adobe PDF printer by using this code:


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

DoCmd.OpenReport strReport, acViewNormal, , , acHidden




I am trying to figure out if there is a way to use an Acrobat object to set the path and document name without user intervention (which the code above requires as a dialog pops up requesting that information).


So, I am pretty good at figuring out how to use the various properties and methods of objects but I am just not sure WHICH objects I should be dealing with and I got lost in trying to read the SDK.


Can anyone provide at least a push in the right direction?

------------------------------------------------------

We have been using ACG Software's PDF PRO PLUS Library but we are moving to have to use Citrix for all users and we could not get that to work in Citrix. We want to have a "no dll" solution if possible so I am exploring all of our options.
 

vbaInet

AWF VIP
Local time
Today, 02:27
Joined
Jan 22, 2010
Messages
26,374
With a software like that the Adobe PDF Reader/Writer library wouldn't be accessible or even visible for you to use in Access. I don't think any Access report to PDF writer exposes the PDF interface but you could be lucky. I remember DCrake had a similar issue but in his case he just wanted to convert reports to pdf in 2003. I think he scrapped the idea and upgraded the FEs to 2007.

You could try purchasing the Adobe Suite for developers, include that library and working via that interface to convert your reports to PDFs. This would certainly be a mammoth task.
 

DCrake

Remembered
Local time
Today, 02:27
Joined
Jun 8, 2005
Messages
8,632
Bob

Is the bottom line that you want to output an Access 2003 report to a dynamic path and file name as a pdf without any user intervention?
 

boblarson

Smeghead
Local time
Yesterday, 18:27
Joined
Jan 12, 2001
Messages
32,059
Yes, bottom line - output to PDF with dynamic path and filename without user intervention.
 

boblarson

Smeghead
Local time
Yesterday, 18:27
Joined
Jan 12, 2001
Messages
32,059
2003 but I'm thinking I'm just going to push for 2007 as it has DoCmd.OutputTo capability to PDF (SP2). A co-worker found this thread which showed how to do it with 2003 (and earlier) and we don't want to have to deal with registry keys, especially on Citrix.
 

blauber

New member
Local time
Today, 03:27
Joined
Jun 16, 2010
Messages
5
Bob

we want to do the same with the DoCmd.Output command.
E.g.:
docmd.OutputTo acOutputReport,"Test_Report",acFormatPDF,"c:\temp\test2.pdf",true

This works fine for us. The problem we now have is the fact that when the pdf document has been created, each time Adobe Acrobat is opened an shows the generated PDF document. (Like the option "View ADB PDF results" in a ADOBE PDFPrinter).

What can we do to suppress that?

Bernhard
 

ghudson

Registered User.
Local time
Yesterday, 21:27
Joined
Jun 8, 2002
Messages
6,195
Bob

we want to do the same with the DoCmd.Output command.
E.g.:
docmd.OutputTo acOutputReport,"Test_Report",acFormatPDF,"c:\temp\test2.pdf",true

This works fine for us. The problem we now have is the fact that when the pdf document has been created, each time Adobe Acrobat is opened an shows the generated PDF document. (Like the option "View ADB PDF results" in a ADOBE PDFPrinter).

What can we do to suppress that?

Bernhard

If you do not want to open the PFD file after you create it then change the AutoStart option to False. You have it set to True at the end of your
DoCmd.OutputTo command.
 

boblarson

Smeghead
Local time
Yesterday, 18:27
Joined
Jan 12, 2001
Messages
32,059
Also, regarding the original post of this thread - you can't use DoCmd.OutputTo unless you are on Access 2007 or 2010 (which I am not - at work anyway).

So, I have gotten some code to work and will post it all when I get the time to do it.
 

blauber

New member
Local time
Today, 03:27
Joined
Jun 16, 2010
Messages
5
If you do not want to open the PFD file after you create it then change the AutoStart option to False. You have it set to True at the end of your
DoCmd.OutputTo command.
I overlooked that. Thank you for your tip!:)
 

Users who are viewing this thread

Top Bottom