PC Review


Reply
Thread Tools Rate Thread

Application.FollowHyperlink

 
 
dymondjack
Guest
Posts: n/a
 
      30th Jan 2009
After seeing numberous posts (I believe by Albert Kallal(sp?)) regarding
using Application.Hyperlink rather than the Shell command to open files, I
recently applied this to a small utility db. I deployed this db about a week
ago, and the Application.Hyperlink worked fine, for everything except one
filetype in particular.

Here's the basic code I used:

sDocPath = "\\DSServer\Data\PartDocs\509.dwf"
Application.FollowHyperlink sDocPath

The sDocPath variable changes depending on which doc is going to be viewed
(509 is the ID for this particular one), but the folder never changes. The
file extension is stored in the table and is contencated after the ID. This
works for .xls, .doc, .pdf, .dwg, .sldpart, basically everything except .dwf
(.dwf files are distributable versions of Autodesk files).

My first thought was that the .dwf filetype wasn't registered with the local
computer, but as it turns out, it is. I can manually go to the file and open
it, no big deal. (the server itself is strictly a fileserver... it doesn't
even have msoffice installed). I've verified the file's existance through a
FileExist function in vba, and everything looks fine there. But if I run
FollowHyperlink on any .dwf file that has been entered, it acts as though it
should open it (no errors raised, code goes through without any issues), but
nothing happens.

The user brought this up this morning, so I switched him back to the
ShellExecute API that generally use, and now everything works fine.

Any ideas why Application.FollowHyperlink is failing for this particular
filetype? I even went to the extent of making sure that the entire path was
case-matched, to no avail.

Thanks


--
Jack Leach
www.tristatemachine.com

- "A designer knows he has reached perfection not when there is nothing left
to add, but when there is nothing left to take away." - Antoine De Saint
Exupery
 
Reply With Quote
 
 
 
 
dymondjack
Guest
Posts: n/a
 
      30th Jan 2009
For the record, I've always found these .dwf files to be a major pain... I
constantly run into errors trying to view them (autodesk puts out a new
viewer about every 6 months or so and if you don't use the right one with the
right files, it won't work), but alas I have no choice as my customer
distributes only these .dwf cad viewing files.

Is it possible that there may be a security feature associated with the
filetype (put there by Autodesk) that prevents them from opening via
hyperlink addressing? I don't know much about how the system handles stuff
like this (if there's even a difference), but I thought it an odd coincidence
that my least favorite of all filetypes is now giving me issues with methods
that others have used without fail.

--
Jack Leach
www.tristatemachine.com

- "A designer knows he has reached perfection not when there is nothing left
to add, but when there is nothing left to take away." - Antoine De Saint
Exupery


"dymondjack" wrote:

> After seeing numberous posts (I believe by Albert Kallal(sp?)) regarding
> using Application.Hyperlink rather than the Shell command to open files, I
> recently applied this to a small utility db. I deployed this db about a week
> ago, and the Application.Hyperlink worked fine, for everything except one
> filetype in particular.
>
> Here's the basic code I used:
>
> sDocPath = "\\DSServer\Data\PartDocs\509.dwf"
> Application.FollowHyperlink sDocPath
>
> The sDocPath variable changes depending on which doc is going to be viewed
> (509 is the ID for this particular one), but the folder never changes. The
> file extension is stored in the table and is contencated after the ID. This
> works for .xls, .doc, .pdf, .dwg, .sldpart, basically everything except .dwf
> (.dwf files are distributable versions of Autodesk files).
>
> My first thought was that the .dwf filetype wasn't registered with the local
> computer, but as it turns out, it is. I can manually go to the file and open
> it, no big deal. (the server itself is strictly a fileserver... it doesn't
> even have msoffice installed). I've verified the file's existance through a
> FileExist function in vba, and everything looks fine there. But if I run
> FollowHyperlink on any .dwf file that has been entered, it acts as though it
> should open it (no errors raised, code goes through without any issues), but
> nothing happens.
>
> The user brought this up this morning, so I switched him back to the
> ShellExecute API that generally use, and now everything works fine.
>
> Any ideas why Application.FollowHyperlink is failing for this particular
> filetype? I even went to the extent of making sure that the entire path was
> case-matched, to no avail.
>
> Thanks
>
>
> --
> Jack Leach
> www.tristatemachine.com
>
> - "A designer knows he has reached perfection not when there is nothing left
> to add, but when there is nothing left to take away." - Antoine De Saint
> Exupery

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
application.followhyperlink hangs Access application Charlie O'Neill Microsoft Access 3 13th Mar 2010 05:31 PM
Application.Followhyperlink =?Utf-8?B?QXByaWw=?= Microsoft Access VBA Modules 5 30th Jul 2007 07:35 AM
application.followhyperlink =?Utf-8?B?emFjaG5qb2U=?= Microsoft Access Getting Started 5 27th Sep 2006 06:12 PM
Repost: Application.FollowHyperlink =?Utf-8?B?TWU=?= Microsoft Access Form Coding 0 24th Apr 2006 05:48 PM
Application.FollowHyperlink Query n_s_simpson Microsoft Excel Programming 4 9th Mar 2006 10:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:33 PM.