|
I don't understand this, Michael. Setting up so that Windows calls
Adobe Reader for PDF documents is automatically done when you install
Adobe Reader. Sure, it's possible for a user to undo that association,
but then they wouldn't be able to open PDFs from a browser, E-mail
client, Windows Explorer, et al. They'd have to manually open Adobe and
then use File/Open to read a PDF. Certainly possible, but who does
that in this day and age?
Or perhaps a better question, who does that *and* expects PDF documents
to just automatically open up for them on the screen?!
I do NOT, however, agree with Doug's suggestion of using the DOS "start"
command. The "start" command will lead to oodles of hard-to-solve
errors any time you have special characters in the path name. Plus, it
causes an ugly DOS window to open for each PDF.
Instead, use a Windows program with the ShellExecute() API, or
ShellExec_RunDLL from the command-line via the Rundll32 program.
And searching for and finding the adobe reader executable isn't a good
way to handle things, either. What if a user has more than one copy of
it, and is using one version for production use and another one just for
tests? How can your VB program know which one is which?
Or for whatever other reason, they have another program called AcroRd32?
How can you know which one to run? (It could even be a trojan taking
advantage of the way your VB program works to try to trick you into
running a malicious tool... unlikely perhaps, but possible.)
Perhaps only a small percentage of folks will do these things -- but
still -- why NOT do it the right way?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.