Every time I open a jpg attachment in apps 10 IEE, I get the “How do you want to open this file?” prompt by Windows, and regardless of how many times I check the “always use this app to open .jpg files” checkbox, I always get this prompt when I open a jpg attachment. I know Windows is storing this app as the default program because Windows never prompts me with this when I open jpgs via other methods like email attachments, locally saved jpgs, network pictures, etc. It’s only occurring when I open a jpg via the IEE app. I can even navigate to the folder where IFS downloads the jpg file and open it successfully from there.
I’ve tried resetting the Photos app in Windows and re-confirming the default app choices in app settings. I’ve spoken to other users of our apps 10 IEE setup and they don’t appear to have this same issue. Any thoughts on how to remedy this?
Thanks,
Evan Edwards
Page 1 / 1
I have seen strange things happening with some image formats on Windows. It started some years back. I know it's probably not the app you want to use, but what happens if you chose Paint the next time? Does that also not stick?
HI,
You could also check your default app for the file type to see if the action actually saves your preference for the default file types in the settings. This can be found from Microsoft’s own settings: settings---applications---choose default apps by file type (scroll down to find this)
Here is a screenshot of the setting:
@Mathias Dahl
I opened a jpg file and when the program pop up came up this time, I selected Paint and checked the box to always use this app and it opened the image in paint. But now when I try open the jpg attachment, I get this error. I haven’t seen this error before. Windows did keep Paint as the default app though because if I open a jpg saved locally, it opens in paint without issues.
I then switched the default program back to the Photos app in Windows. I’m able to open the jpg attachment from IFS without the error message above, but it still gives me the which app do you want to use pop up each time.
I don’t know if this helps or not, but I previously used a desktop tower and a Microsoft Surface laptop from when we started implementation of IFS (2021) until June of this year. I never had this issue with both the desktop tower and the Microsoft Surface. My devices got consolidated to a Dell laptop in June of this year, and that seems to be when this issue started happening. Not sure if this is coincidental or not.
@Samuel Jokinen
Below is a screenshot showing the default program by file type. I’ve tried changing and resetting these to the Photos app again, but I still get the which app do you want to use pop up each time.
Would you be willing to configure a Docman macro to resolve the issue? It will probably do the trick?
@Mathias Dahl
Sure, I’d be willing to try anything, but I haven’t done any docman macros before. How would I go about doing this?
Thanks,
Evan Edwards
@Mathias Dahl
Sure, I’d be willing to try anything, but I haven’t done any docman macros before. How would I go about doing this?
Thanks,
Evan Edwards
Hi @eedwards , sorry for the late reply.
Firstly, you should read our documentation about what document macros are, and how to install them:
' Below, "Open" can be replace by "Print" for printing the file
' instead of opening it.
oShell.ShellExecute fileName, "", "", "Open"
End Sub
' ------------------ Macro block OPENFILE starts here
Then, create a new record under the Document Macro tab (follow the steps in the documentation) and add the two macro blocks defined earlier in the table at the bottom of the page.
This macro does more or less what Docman normally does, it asks Windows to open the file. But it's not doing it in the exact same way, so it might work better for you.
If the macro does not work, it can easily be made to force a certain application to open the file.
Let me know if you have any questions.
Perhaps a screenshot of the setup helps:
Now when you view a JPG file, the macro will take care of opening the file.
Also see:
I forgot something: you probably don't want to click Run Macro to run the macro, you want it to run automatically. You configure this by going to Document Class Process Action and create a new record there for the document class you want to configure, and the process (view). In the macro option field, select "Run of only one". You need to do this for all document classes that has JPEG images checked in.
I forgot something: you probably don't want to click Run Macro to run the macro, you want it to run automatically. You configure this by going to Document Class Process Action and create a new record there for the document class you want to configure, and the process (view). In the macro option field, select "Run of only one". You need to do this for all document classes that has JPEG images checked in.
This is how it can look:
Hope this helps!
@eedwards
@eedwards Did you try this out? Did it work?
Hi @Mathias Dahl ,
I apologize for the large delay in my response. I had some long training and conferences I was attending recently and did not have a chance to test this out until now.
I’m testing this out in one of our test environments, and I’m running into a syntax error when attempting to run the macro.
I’ve set up both macro blocks under the Document Macro Blocks using the code strings from above:
Then I created the new macro under the Document Macro tab following the instructions and screenshot:
The macro seems to be initializing properly because when I try open jpg file, I get the Choose Macro prompt (I haven’t set up the document class process action yet just to make sure the macro was running properly). When I click Run on the Open file in Windows macro, I get this syntax error message:
I’m assuming this is meaning there’s a syntax error in one of the macro blocks, but I’m not very familiar with the visual basic programming language to be able to debug what the error might be. Any thoughts on this?
I'm pretty sure I tested those macro blocks myself, so they should not have any syntax errors. Perhaps something went wrong when copying and pasting them?
Can you provide screenshots of the macro blocks here?
I tried running these through a word comparison and it didn't really find any mismatches. Here are screenshots of the macro blocks as they are pasted in IFS:
UTILS
OPENFILE
Strange. Can you try, temporarily, with a macro that only shows a message box? It's described in the documentation. We need to determine that macros can run at all.
Hi Mathias,
I’ve narrowed it down to a syntax error somewhere in the UTILS macro block. I created a new macro block called HELLO that just runs a message box saying Hello!.
I then changed the document macro for opening jpg to just have that macro block associated to it. When I opened a jpg file, I successfully got the message box pop up. I then added the OPENFILE macro block and was still able to successfully get the hello message box pop up. I deleted the OPENFILE macro block and added UTILS and when I try open a jpg file, I get the syntax error pop up instead of the hello message box.
I also accidentally stumbled across that this issue only seems to apply to images that are loaded into IFS with the file extension of .jpg. I don’t get the window requesting to select the program to load images that are loaded in with the .jpeg extension. I’m not sure if this helps at all, just an odd thing I stumbled across troubleshooting the above macro issue.
@eedwards
Hi again.
I think I know what the problem is. When you copy the source code from the post above, you will get an extra empty line per line of code (it's a problem with the text editor on this site, it's not in the original source code I wrote).
For many lines it does not matter, but in some case it does:
1 If Err.Number <> 0 Then
2
3 MsgBox "Could not get attribute """ & UCase(Name) & _
4
5 """. It might be misspelled. Error: " & Err.Description
Line 3 there has an underscore at the end. It means the line continues on the next line. But, since the next line is an empty line, you get a syntax error.
The solution is to remove the empty line after all lines that end with "_" like line 3 above.
I found this by copying the code into a test.vbs file that I just ran on my PC. It then showed the line number where the problem is.
As for .jpg vs .jpeg, since they are two different file extensions for the same kind of files, both Windows and IFS will see them as different and, for some reason, one is setup correctly in Windows and the other one not.
Hope you can get this to work now.
Hi Mathias,
This solved the syntax errors I was getting. I fixed the instances of this and it allowed the macro to run without issues next time I opened a jpg. Unfortunately, Windows still asked me what program I’d like to use each time regardless of me checking the “always use this program” checkbox. I just found out form our IT group that my computer is going to be upgraded to Windows 11 in the next week or so, so I’ll test after that again to see if the operating system change makes any difference. I’ve tested with a few other users at our company and none of them are having this issue with opening jpg files though.
Thanks,
Evan Edwards
Now that macros are running, what you can do is to have the macro explicitly open the file in a specific application. I asked ChatGPT to write an example program for doing that:
Set objShell = CreateObject("WScript.Shell")
jpegFilePath = "C:\path\to\your\image.jpg" ' Replace with the actual path to your JPEG file