"Notepad cannot be found" error for excel script

Iron Contributor

 

Hi experts,

 

I've been trying to deal with the error for months and still could find the root cause...Wondering whether someone could help.

 

We have a monthly report that is sent to us from external company created in EXCEL (xlsb format)... That report contains an button that runs macro to generate XML...  However, I am not sure what goes wrong as some user get the error below.

 

 notepaderror.jpg

 

 

Now, it works for some users and does work for others...It looks a bit random. What I've tried:

  • ran all updates (windows and office) - didn't help
  • reinstalled office - didn't help
  • reset laptop for problematic user
    • it worked for few weeks and then the error returned
    • I've just noticed that when I log in with my account to that laptop, I get the same error
    • When I log in with a test user account that I use - the error doesn't show up (but not sure how long would that work as it was working for that other user for few weeks with no issues)
    • anyway - using different user accounts on the same computer has different results

       

      Any idea how I could investigate? I would say that the macro is not programmed very well but we got that xlsb from a bank who claims that other do not have this issue and it must be us having something wrong.

       

      I thought it could be windows or office updates that may cause problem to the macro, but as I tested today on the same laptop with different users accounts, as described above, I'm not sure now that updates could be the issue here.

       

      Any advise would be great... as it is starting to be quite frustrating after months 🙂

       

      We run on Windows 11 and Office 365

 
UPDATE: just to give some info about how it should work - the script should generate an XML and the last steps are -> open NOTEPAD -> paste the data there -> save the notepad file on Desktop.... This seems to be failing.
On another computer, as an example, it could open Notepad, paste the data there... save on Desktop - last few steps of the script do something that deletes the file from Desktop though,  however I can open the notepad manually and the data are still there cached so I can save it manually at least 😕
5 Replies
Can you show us the script please?
unfortunately, I don't think I can see the script. As I've mentioned before, we receive a report from a bank in XLSB format... When I try to show the script - it is password protected and I do not have the password.
If you share your file,I can try to dump the script with python oledump.
Not a solution for you, but perhaps you should contact the bank and inform them about this issue. The VBA code is obviously not entirely fool-proof.
I've just found that MS Defender marks the XML that is generated as a "Malicious file" and probably bloks/removes it during the export process....

Will open another question in Defender forum