none
Follow Hyperlink Not Working For TIF Files

    Question

  • I have an application that stores Hyperlink names in a table.  I follow the hyperlink using the following code

    Application.FollowHyperlink V_POFileLocation & "\" & Me.INVOICE_DOCUMENT, , True

    I works fine for JPG, DOC, TXT files, all it seems except TIF files.  The computer has Tif files associated with Windows Fax and Picture Viewer and will open the file from like explorer.  However, when access 2003 tries to follow the hyperlink, it says "Run-time error '486'; No program is registered to open this file.  Debug of course takes me to the line I inlcuded above.

    The file included listed in Me.INVOICE_DOCUMENT is there (BSCI 0009 01.TIF) and the entire path from V_POFileLocation & "\"  Me.INVOICE_DOCUMENT is valid.  (X:\DataBase\MoldingToolTracker\PurchaseOrders\BSCI 0009 01.TIF)

    Any ideas?

     

     

    Thursday, March 17, 2011 3:02 PM

Answers

  • I have an application that stores Hyperlink names in a table.  I follow the hyperlink using the following code

    Application.FollowHyperlink V_POFileLocation & "\" & Me.INVOICE_DOCUMENT, , True

    I works fine for JPG, DOC, TXT files, all it seems except TIF files.  The computer has Tif files associated with Windows Fax and Picture Viewer and will open the file from like explorer.  However, when access 2003 tries to follow the hyperlink, it says "Run-time error '486'; No program is registered to open this file.  Debug of course takes me to the line I inlcuded above.

    The file included listed in Me.INVOICE_DOCUMENT is there (BSCI 0009 01.TIF) and the entire path from V_POFileLocation & "\"  Me.INVOICE_DOCUMENT is valid.  (X:\DataBase\MoldingToolTracker\PurchaseOrders\BSCI 0009 01.TIF)

    Any ideas?

    I've never delved into the mysteries of why FollowHyperlink works for some registered extensions and not others.  Possibly there is something you can do by way of a registry edit to make it work, but my inclination would be to use the ShellExecute API instead, using code like what is posted here on the Access Web:

         http://www.mvps.org/access/api/api0018.htm

     


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html
    • Marked as answer by Bruce Song Monday, March 28, 2011 10:06 AM
    Thursday, March 17, 2011 3:51 PM

All replies

  • I have an application that stores Hyperlink names in a table.  I follow the hyperlink using the following code

    Application.FollowHyperlink V_POFileLocation & "\" & Me.INVOICE_DOCUMENT, , True

    I works fine for JPG, DOC, TXT files, all it seems except TIF files.  The computer has Tif files associated with Windows Fax and Picture Viewer and will open the file from like explorer.  However, when access 2003 tries to follow the hyperlink, it says "Run-time error '486'; No program is registered to open this file.  Debug of course takes me to the line I inlcuded above.

    The file included listed in Me.INVOICE_DOCUMENT is there (BSCI 0009 01.TIF) and the entire path from V_POFileLocation & "\"  Me.INVOICE_DOCUMENT is valid.  (X:\DataBase\MoldingToolTracker\PurchaseOrders\BSCI 0009 01.TIF)

    Any ideas?

    I've never delved into the mysteries of why FollowHyperlink works for some registered extensions and not others.  Possibly there is something you can do by way of a registry edit to make it work, but my inclination would be to use the ShellExecute API instead, using code like what is posted here on the Access Web:

         http://www.mvps.org/access/api/api0018.htm

     


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html
    • Marked as answer by Bruce Song Monday, March 28, 2011 10:06 AM
    Thursday, March 17, 2011 3:51 PM
  • I realize that this thread is marked answered, and is quite old (over a year old), however, I encountered this specific problem and found a solution.

    Each machine trying to following a picture hyperlink must have an association to a program to open that type of file (.bmp, .jpg, .tif).   What I encountered is that even though a program (Windows Fax and Picture Viewer) associated to that file, it's not enough.

    Find a .tif file on the machine that's having the problem.  Right click the file and use the OPEN WITH > option...at the bottom is a Choose Program... option.  A window lists the programs that you can use for that file type.   Select the program you want to "register" to open this file.  DO CHECK the button to Always use that program for that type of file and click OK.    Your hyperlinks for .tifs will now work on that machine.

    I understand that having a program selected as the "default" program for graphics files SHOULD work, but for some reason it's not enough for the Access hyperlinks.   You have to go through the above steps in order for Access to understand what program to use for that file type.   My issue was with .jpgs, and the machines in questions would open a jpg without problems through Windows Explorer, but the hyperlinks in Access to the jpgs would pop up that error.

    There may be an "easier" solution available with creating a registry entry, but I don't know what that solution would look like.

    Wednesday, December 12, 2012 5:02 PM