Word Plugin: VB Run-time error 5097
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Just as a quick timeline, as it's taken me all night to fix this shit.
I recently upgraded my pc so I did a clean install of windows
Installed office 2016 from some repack I found on my harddrive, yes not legal I know. The first issue of not being able to save popped up right at the start, and I saw that someone early in this thread also had it, it's due to the word tab extension that is part of the repack, just get rid of it.
As for the zotero, I found out this afternoon while writing a paper. After lots of googling and reinstalling and wanting to throw my pc out of the window, I checked my restore points, saw that windows had conveniently made one before my office install (god bless). I restored to before it, in the "programs that will be affected" list were a ton of microsoft office updates. I don't want to go through the same ordeal again so I won't test it, but to those struggling with this, I suggest the following:
(possibly reset your user settings in the registry but might not matter)
1. uninstall office 2016
2. uninstall all your microsoft office updates
Go into control panel>programs>programs and features>installed updates
Just remove them all I wouldn't risk any, but if you want to test feel free
3. Reinstall office 2016, but take an old one and don't update after it installs, I even installed it with my internet disabled to be sure
By old I just mean one without the updates, mine was from june 2016, it's what I used on my laptop and zotero works there so that's what I went with.
If someone wants to play with the updates and find out which one causes it, feel free, I'm just happy mine works now. Good night
edit: set regional format in windows to English (United Kingdom), restart word
See video: https://my.mixtape.moe/niknun.webm
I installed office with my regional format (in windows) set to English (United Kingdom) not sure if this is relevant to the problem but it might be. I live in the Netherlands so I changed it to English (Netherlands) later on. All the restore point did to fix it was set the regional format back to English (United Kingdom). As just now I tried to change it to netherlands it broke again.
Here's a short vid 100% reproducible on my side: https://my.mixtape.moe/niknun.webm
Good luck everyone
That solution worked for me too (my regional format was "English (Israel)"!
Changing it to "English (United Kingdom)" fixed the problem (or at least plastered it).
Thanks!
Switching my regional format away from "English (Germany)" to "English (United Kingdom)", and then restarting Word 100% fixes the problem. This issue has been plaguing me for three months and I had tried everything I could think of: complete reinstalls, messing with temp folders, the registry, etc. Out of desperation, I was about to move to Linux/Libre Office even though most of the critical tools I need for work are Windows-only.
I can't thank you enough.
@norazi @bastiaanwaagmeester: thank you for your reports in the Hub. Looks like this is absolutely a Windows/Office issue, and a reproducible one at that. Wonder if MS will fix it...
- In “Windows settings” go to the page for “Region” which has settings for “Regional format”
- Change that setting (in my case from “English (Switzerland)”) to “English (United Kingdom)” or "English (United States)". That fixed the problem on my system.
Perhaps others with this '5097' problem have some other regional format setting that causes the problem, and hopefully it can be changed from something Office dislikes to something acceptable.
Zotero citation add-in, which works by running macros, was a casualty but not the cause of this Office VBA problem. I was getting the same ‘5097’ error when I tried running other macros, and I had also been unable to create new macros. The error message when trying to create a new macro referred to a “memory error” and provided unhelpful suggestions in a Help window. After changing the regional format, all now appears working okay.
I had not changed these regional settings recently. The problem may have begun with a Windows 10 update around October or November that introduced this regional format hypersensitivity. It is also notable that after first experiencing the problem, reverting to earlier versions of Office did not help.
YOU are my total here of the day.
Dear, it´s been a long exhausting christmas trying to figure out this absolute rediculousness!
Absolute and total boss.
Happy new year! I had the same issue, and it is now resolved thanks to mgw14! Thanks so much!
One thing I do wonder what changed on the windows side to break macros in word, and if there is a way on zotero's side to make it work with other regional settings.
By all means I'm not familiar with VB or Word/Office macros at all, just trying to help figure out a solution because I would like to set my regional format back when possible.
With windows 1809 the language and regional format were seperated, first it was one setting, and now it allows you to override the regional format. So I assume that's how the problem started.
From what I found other programs have had to make changes recently too
Could this be of use? https://docs.microsoft.com/en-us/office/vba/access/concepts/date-time/format-dates-as-u-s-dates-regardless-of-regional-settings
https://answers.microsoft.com/en-us/windows/forum/all/time-separator-changing/6980144c-611c-41dc-b2b9-ce05df40868e
https://auticsystem.zendesk.com/hc/no/articles/115004564808-CitectSCADA-2015-Service-Pack-1-Patch-33
https://support.unitrends.com/UnitrendsBackup/s/article/000001637
Hope this helps.
As for a proper fix, this is a Word issue and not directly related to date formatting VB macros. The Zotero plugin does not make use of them, nor is it likely that the Mendeley plugin does. You should still report this to Microsoft with as much details as you can, since it is a problem on their end. There is no way to directly reach their devs, even for third-party developers, so making as much noise is your best bet if you want an issue resolved.
Dear sir/madame,
Thank you so much, this instantly fixed my problem!
Such a silly thing as regional language shouldn't be a problem though! (: What a time to be alive!