Re: Search for File/Directory
- From: dymondjack <dymondjack at hot mail dot com>
- Date: Mon, 2 Mar 2009 16:27:02 -0800
I always thought of ".FollowHyperlink " as for opening web pages only.
A 'hyperlink' isn't only webpages, but can be a UNC filepath as well, which
covers almost every file or shortcut on the computer.
The only issue that I've found with .FollowHyperlink is that the OS opens it
as a hyperlink, which are handled with much much higher security due to this
wonderful age of spyware/adware/viruses, etc. At one point I tried using
FollowHyperlink at the recommendation of some fellow posters, and it worked
well - for the most part. There was one particular type of file (autodesk
..dwf) that I ran into that could not be opened like this. Under the
circumstances, I think that it had more to do with the security built into
the file rather than the OS, but I had also noticed that some paths required
verification from the users.
I can't imagine pdf files being problematic here (they worked fine with this
in my system, when I did use it), but I thought I would throw it out there
anyway.
For whatever reason (I don't remember why, really), I wound up using neither
the Shell function built into vba, or .FollowHyperlink, but instead the
ShellExecute API, which can be found here:
http://www.mvps.org/access/api/api0018.htm
Again, I don't know if I ever had problems with the regule Shell function,
but I am a faithful user of ShellExecute.
Regarding the path of the executable to open a pdf document, ShellExecute
should be able to open the file regardless of what version of acrobat (reader
6,7,8, standard, pro) is installed. ShellExecute *should* be reading the
registry for the associated executable for the filetype it is trying to open.
If there is no registered executable for that particular filetype, you
*should* get the "Open With" dialog. (AFAIK, this is the same thing
FollowHyperlink does, only at a 'system' level instead of 'user/hyperlink'
level).
That said, I don't know why the Shell function wouldn't do this... I was of
the impression it worked the same way (get the registered executable). In
any case, I am able to use ShellExecute with three different versions of
acrobat/reader on various client computers, without issue.
I'm not sure exactly how accurate all of this is, this type of stuff isn't
my strong point, but I figured I'd throw it out there from my own experience
with it. I think I've got the general jist of it down, any, if all my
details aren't quite where they should be.
--
Jack Leach
www.tristatemachine.com
- "First, get your information. Then, you can distort it at your leisure."
- Mark Twain
"y770" wrote:
Thanks a lot!.
I always thought of ".FollowHyperlink " as for opening web pages only.
To learn something new is never too late and never to early ;)
Thanks again.
"Danny J. Lesandrini" wrote:
Use Application.FollowHyperlink strFileName instead of Shell
--
Danny J. Lesandrini
dlesandrini@xxxxxxxxxxx
www.amazecreations.com
"y770" <y770@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote ...
I need to launch pdf file in external Acrobat window. Using Call Shell
require exact path to the Acrobat Software. Here is my probem starts. The
application I am writing is used bay many people on the network. Some have
Acrobat 8, some 9, some Reader some Pro..., etc. How do I find a path to
appropriate software to open pdf file?
If there is a link that describes the solution or the hint to the solutuon,
it will be greatly appreciated.
Thanks for your help.
- References:
- Search for File/Directory
- From: y770
- Re: Search for File/Directory
- From: Danny J. Lesandrini
- Re: Search for File/Directory
- From: y770
- Search for File/Directory
- Prev by Date: RE: Unlink command
- Next by Date: import info from tiff world file (tfw)
- Previous by thread: Re: Search for File/Directory
- Next by thread: RE: Query output into the body of an email
- Index(es):
Relevant Pages
|