Printing a PDF file directly from Access 2007

L

LA Lawyer

I want to use Access 2007 to print out a specific pdf file, preferably
without opening the pdf file. I have installed Microsoft's pdf add-on.

What is the command?
 
A

Albert D. Kallal

LA Lawyer said:
I want to use Access 2007 to print out a specific pdf file, preferably
without opening the pdf file. I have installed Microsoft's pdf add-on.

What is the command?

You might want expand a little bit on what you mean by print out a pdf file?
The PDF add-in for MS access allows you to export (save) a report as a pdf
file. You can also email an access report as a pdf file. Keep in mind this
PDF ability has have absolutely no relationship to the ability of MS access
to print out a typical pdf file that just happens to be sitting somewhere on
the hard drive.

The ability to print a word file, an Excel file or a pdf file is going to
require that appropriate software is installed on your machine. In most
cases the free acrobat reader is typically installed on every machine I've
ever worked with.

The following code will print a pdf file:

dim strWhatFile as string

strWhatFile = inputbox("Enter file name to print")

CreateObject("Shell.Application").Namespace(0).ParseName(strWhatFile).InvokeVerb
("&Print")

You can expand on your question, and perhaps I miss understood your
question.

Note that the above code will work if the user enters an excel, word, or pdf
file.
And, as mentioned, the above will work even when the office pdf add-in is
not installed.
However, some type of pdf viewer will have to been installed on the
computer.
 

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