Print PDF Files

R

RomanTobler

Hi,

I have to create a form from which I can print a number of existing PDF files.

I tryed to create an (PDF)-object:
Dim App As Object, PDFDoc As Object

Set App = CreateObject("AcroExch.App")
Set PDFDoc = CreateObject("AcroExch.AVDoc") . . .

.. . . but I always get the error 429 "cannot create active-x"

I have installed Adobe Acrobat Reader 8 (no Acrobat std or Pro!).

Can someone help me?

roman
 
A

Albert D. Kallal

You can use the following code to print word, excel, or pdf documents AS
LONG
as the application supports a "right click"-->print...

so, when I right click word docs, or pdf, there is a option to print....

The following one line of code will print your pdf doc...

CreateObject("Shell.Application").Namespace(0).ParseName("c:\mypdf\myDoc.pdf").InvokeVerb("&Print")--Albert D. Kallal (Access MVP)Edmonton, Alberta (e-mail address removed)
 
A

Albert D. Kallal

this post was messed up...
here is the one line of vba code:


CreateObject("Shell.Application").Namespace(0).ParseName("c:\mypdf\myDoc.pdf").InvokeVerb
("&Print")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top