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?
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!
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.