Application.FollowHyperlink sudden problem

wackywoo105

Registered User.
Local time
Yesterday, 17:18
Joined
Mar 14, 2014
Messages
203
I have used the code below for many years without issue

Code:
Application.FollowHyperlink "C:\ProgramData\folder\temp." & filetype

The files it opens are either jpg, pdf or docx.

Previously they would just open in windows explorer as if you have clicked on them. As of today for jpg the code just opens Internet Explorer. I thought I would get rid of IE, so removed it from windows. Now I just get "No program is registered to open this file." error. For docx and pdf it still works. I can click the jpg files and they open with windows photos (which is set a default app) as normal, it just doesn't work using Application.FollowHyperlink anymore.

Does anyone know why the sudden failure and how to fix this?
 
Windows file explorer may have lost the file association with .jpg files

If you look under file types or right-click a jpg in explorer what does it try and open it with?
 
It lists paint, paint 3d, photos, snip and sketch. Clicking on it in explorer works fine. It's just the access code that doesn't work.

Saying that now my .url files are playing up. They used to open in chrome but now they just open to show text:

[InternetShortcut]
URL=https://www.access-programmers.co.u...cation-followhyperlink-sudden-problem.323411/

so maybe something else is going on.
 
you can try to restore your system settings.
 
It lists paint, paint 3d, photos, snip and sketch. Clicking on it in explorer works fine. It's just the access code that doesn't work.

Saying that now my .url files are playing up. They used to open in chrome but now they just open to show text:

[InternetShortcut]
URL=https://www.access-programmers.co.u...cation-followhyperlink-sudden-problem.323411/

so maybe something else is going on.
So look at your File associations. Even if one program is not listed, you can browse to it.
 
I've got the urls working again. I had to add IE back and then select chrome as default. Oddly it doesn't work without IE being installed for some reason.

I have another PC at work with a similar setup, so will see what's going on with that when I'm next in work.

My last system restore resulted BSOD which thankfully a reversal fixed, so I'm not so confident of going down that route. Maybe it's time for a fresh install but there is always something you can't get working properly again that adds to the grey hair count.
 
I logged into my work PC and it is having the same issue. Trying to open .jpg via Application.FollowHyperlink invokes internet explorer 11 (and asks to set it up as I've never used it before).

Clearly an MS update has borked something as usual.

Does anyone know a workaround for .jpg? Can I use shell/command to do it?
 
When trying to open a .htm file stored on my local drive using this command line: "Application.FollowHyperlink MyMapFile, , True" it will only accept it opening using Internet explorer.

If I change the Internet Explorer folder name I get an error telling me it can't find Internet Explorer.

Using the same command to open the very same file from a https:// link opens up the Windows 11 default app for a .htm extension, being it Edge or Firefox.

This worked properly yesterday and for months and years before that, so a recent update. The only thing I updated yesterday was to the latest build of Office365.
 
How frustrating. I note IE11 will be retired on 15 June, so maybe it's got something to do with updates relating to that. Hopefully when it is shut down this problem will disappear.
 
I have now rolled back to the previous Offce365 build, 16.0.15128.20248, and normal functionality have been restored.

16.0.15225.20204 is the bad build.
 
I recently updated to 365 v2205 and cannot replicate the application.hyperlink issue you described.
However, just to be clear, if you are using a web browser control that does open in Internet Explorer .... and ALWAYS has done.

NOTE: I do have the #Deleted bug with linked SQL tables having an nvarchar PK field (the 2205 MayBug)
 
It took a bit of work but I now have:

Code:
Call Shell("cmd.exe /c" & Chr(34) & "C:\ProgramData\folder\temp." & filetype2 & Chr(34), vbNormalFocus)

which is working.

EDIT:

Code:
Call Shell("cmd.exe /c" & Chr(34) & "C:\ProgramData\folder\temp." & filetype2 & Chr(34))

and the command window doesn't flash up.
 
Last edited:
There is a reported bug in A365 v2205 where any controls which use a hyperlink subaddress no longer work
Its not something I normally use but have tested this and can replicate the issue.

However, I do have many apps using Application.FollowHyperlink and all code based on that is still working perfectly for me
 
I have a database that stores documents in pdf, docx and jpg form in an encrypted state. When I want to view one it unencrypted them and places them in a temp folder to be viewed, and then they are deleted once viewed. This has just affected the jpg files, but the above code is working fine.

It's not the first time this has happened. An update a while back broke some SQL code.

It's annoying as I have better things to do that try to fix stuff that has been working for nearly 10 years and then suddenly breaks.

At least I am able to fix it myself.
 
The hyperlink subaddress bug has now been fixed. May be worth checking whether the related hyperlink issues described here have also been fixed.
 
Thanks. I just checked and it is working again.

I will still keep my new code in place just in case this happens again.
 

Users who are viewing this thread

Back
Top Bottom