Print a PDF

  • Thread starter Thread starter Hector
  • Start date Start date
H

Hector

Hi, I have a few PDF files supplied by a third party and from time to time
I'll need to print them from within the Access (2007) database.

I also have some MS Word documents and that was a breeze, but I can't get my
head around doing it for the PDFs.

I have Acrobat 8 PRo installed, and I've referenced various Type Libs in my
quest to get this going but I keep hitting a brick wall.

Ideally I would like it to behave in the same way I've got it working for
the Word docs, ie it just prints in the background without any visible
application starting.

Can anyone help?

Thanks in advance.
 
Hi, thanks for the info and apologies for the delay in replying.

It works! At least I can get the pdf files to print. Although the app only
displays for a second or two and doesnt take the focus., I was hoping however
for it to be a totally background operation. Dont think me ungrateful, I am.
This is progress!

thanks again.
 
oops! my bad
"don't think me ungrateful, I am" should be "I'm NOT"
red-faced, embarassed, with thanks,

h
 
Hi,
This code worked for acrobat reader 6, as I remember, if you have later
version - perhaps you need to adjust it.
Even better if you remove acrobat and install foxit reader, it works much
faster and prints much easier, you can just use shellexecute:

call apiShellExecute(hWndAccessApp, "print", FileName & "", vbNullString,
vbNullString, SW_SHOWDEFAULT)

http://www.mvps.org/access/api/api0018.htm

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
Back
Top