Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I Open/Print PDF from Access 97?

Status
Not open for further replies.

Rafe82ABN

Technical User
Jun 7, 2001
13
0
0
US
I am trying to allow a user to choose a pdf file from a specified directory and either open or print the file. Is there something similar (API...?) to VB's CommonDialog Control that will accomplish this?

Thank you,
Rafe
 
Thanks to Jes from the VBA Coding Forum, I was able to use a program written by Dev Ashish on a site called "The Access Web" which uses an API to call the standard windows dialog box.
The code is over my head, but I was able to decipher it enough to open in the desired directory and limit the available (viewed) files to those with a .pdf extension.

I then used some code I found at Planet PDF "How to Open a PDF and Jump to a Bookmark" ( to open the Acrobat Exchange window so the user can view and print the desired file.

The code is a little more complex than I desired, but it is working. If anyone knows of a simpler method in VBA (Access 97), I would appreciate hearing from you!

Thanks,
Rafe
 
Update!

My success was short-lived. I have VB 6.0 and Adobe Acrobat 5.0 on my desktop and the code worked fine. However, when I tried to run the code from a desktop with only Acrobat Reader installed (no VB), it was not able to call the Acrobat Exchange. Someone has suggested using a shell command, but did not say "How To". Any other suggestions or guidance?

Thank You,
Rafe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top