Word Plugin: VB Run-time error 5097

Zotero word plugin causes Visual Basic Runtime error 5097.
VB error pops up right after clicking any of the Buttons in the Zotero Tab.
Zotero debugger is enabled and does not log any lines when trying to use Word plugin. (My guess: error prevents any interaction between zotero installation and plugin.)

I am using Word 2010
Zotero 5.0.56
Windows 10 64-bit

To solve this, i already tried:
*reinstalled Zotero
*deleted zotero.dot from Word Setup
*reinstalled zotero word plugin via Zotero preferences > Cite > Word processors
*checked that word plugin is enabled

Every other (native) word feature does not cause any errors.
Problem persists in old docs as well as newly created docs.

Any tips on how I can solve this? Preferably without switching to another text editing software like libreOffice or another Word installation.
«1
  • We've not seen bugs like this one before and it seems like a Word issue. Things to try as recommended on various MS forums:
    1) Reinstall Word
    2) Move the Normal.dotm template somewhere else and let Word create a new one on restart
    3) Try running Word with administrator privileges
  • 1) I deinstalled Word 2010 and switched to Office 2016 to be sure

    I tried 2) and 3) and the problem still persists.
  • Did you ever have Zotero and Word working on this machine before you started getting this error? Could you test whether it works in a new Windows profile/user?
  • I am having the same issue!

    I was working just fine on the document two days ago. This morning when trying to add a citation I get this error. It is now happening in every document. Even if I create a new blank document, adding a citation is not possible.

    - I Have uninstalled Office with Microsoft's uninstaller tool and reinstalled it.
    - I have uninstalled Zotero
    - I removed the Normal.dotm as mentioned above

    Running:
    - Window 10 x64
    - Zotero 5.0.57
    - Office Version 1809

    Do you have any other idea?
  • Create a new user profile in Windows and see whether it works there (this is to rule out any user-specific configuration that might be causing the error)
  • It works just fine on another user account. I created a new doument there and added a citation and everything worked. When I tried to edit in on my main account I see the same erro message as before.

    I have now even used the Windows 10 Refresh functionality which deletes most applications for you.
  • edited November 27, 2018
    I have also recently got the same error 5097. However in my case I cannot even save in Word, so I believe I have some larger problem than Zotero only...

    I have tried the suggested steps without success. I also tried to run Word without the Zotero add-in, but I cannot save anyway. Can you guys save Word files? In my case the problem does not appear when running Word as administrator, so I think it is a problem with my user profile, but I haven't managed to solve it yet...

    Windows 10 Pro 1809
    MS Office 365 ProPlus 1803
    Zotero 5.0.58
  • Aside from resetting your word user options (see link above), there's little we can suggest. It's a Word problem, so you're better off posting on Microsoft forums somewhere.
  • Same issue as skynoon. Getting Microsoft Visual Basic Run-time error 5097 as soon as I try to insert a citation in Word. Have tried with a different account and it works. Also tried to reinstall Word as well as Zotero. Resetting my word user options via that wizard did nothing except disabling macros.
    I've been having the problem for several months now and it is super annoying. Would appreciate any help

    Running:
    Win 10 1809
    MS Office 365 ProPlus 1811
    Zotero 5.0.58
  • Currently facing the same issue with MS Office 365 ProPlus 1803 (Semi annual channel) on Windows 10
  • The troubleshooting steps above still apply. Check to see if it works in a new user account on the same computer. If it does, try resetting Word preferences. If that doesn't help you will have to troubleshoot with Microsoft.
  • I have the same problem with:

    - Window 10 x64 Version 1809
    - Zotero 5.0.58
    - Microsoft Office 365 ProPlus Version 1809

    I already tried without success:

    - re-installing the plug-in from the Zotero preferences > Cite > Word processors
    - re-installing Zotero
    -repairing and re-installing Office
    - moving the Normal.dotm like suggested by @adomasven
    - running Word as administrator and from a different Windows user account

    Appreciate any further suggestions!
  • Does it work in a new Windows user account?
  • @adomasven No, for me it doesn't...
  • @norazi If you are willing to do something more technical, you could try opening Zotero.dotm with Word, going into the Visual Basic editor in Word and trying to run the ZoteroAddEditCitation macro from the Zotero VB file and checking what line the error occurs on.
  • @adomasven Thanks for the suggestion! When I tried to run "ZoteroAddEditCitation" in Word's visual basic editor, it seemed to work just fine. Here's what I did:

    1.Opened Zotero.dotm in Word
    2. Opened visual basic editor and clicked "run"
    3. Selected "ZoteroAddEditCitation" and clicked "OK"
    4. The window "Zotero-Document preferences" appears where citation styles can be selected. I clicked "OK"
    5. The search bar appeared where references can be looked up from the Zotero library. I selected a random one from my library and pressed "Enter"
    6. The citation appeared in the Zotero.dotm Word document like it's supposed to

    However, I still get the VB Runtime error 5097 when I try to use the Add-in in a standard word document...
  • Try manually installing the Zotero.dotm file you have downloaded into Word and see whether the plugin works after restarting Word. https://www.zotero.org/support/word_processor_plugin_manual_installation
  • Still the same problem, even after copying the Zotero.dotm manually into the Word STARTUP folder...
  • edited December 18, 2018
    Norazi's observation was helpful, and it suggested a cumbersome work-around that seems to work on my system.

    Make a copy of either the Zotero.dotm or normal.dotm file and open it in Word. Use “open” rather than double click to ensure that it is opened as a dotm file and not docx file. When I did that, the Zotero macros ran okay in that document.

    By working with that new dotm document (or copying contents of another document that no longer permits the Zotero macros to run into this document), I found I can use all the Zotero Word addon functions from the ribbon as previously. By saving the document as a docm file with “save as” options and reopening, the macros still work. The docm document can be opened with double click. If saved as docx or doc files, however, the macros did not run when opened later.

    The problem seems more extensive than just effects on Zotero. Other macros that I routinely use now also produce the VB 5097 error, and the suggested inelegant work-around also enables them to run.

    I had earlier tried unsuccessfully to fix the problem by reverting to a previous version of Office 365 ProPlus, which didn’t help. Perhaps the problem may have resulted from a recent Windows update, and if so, hopefully Microsoft will fix it soon.
  • Having the exact same issue here - Win10, Word (Office 365 installed) and Zotero stand-alone. Error 5097 as soon as i click anything on the Zotero ribbon. The .dotm solution worked, but as soon as I saved it as a docm and reopened it, it was all 5097 error again.

    Going crazy. Does Mendeley plugin have the same issues?
  • @norazi @mgw14 @carlnordlund When you open Zotero.dotm do you get a prompt to enable macros? What are your Macro settings in Word? Have you tried playing around with those?
  • I did get that prompt at first because by default my macro settings in Word were set to disable all macros with notification. However the problem persists even if I change the settings to enable all macros.
  • What about the settings in the Trust Center under Add-ins? What happens if you uncheck all the boxes there? In Trust Center under Trusted Locations is the Word startup folder listed?
  • So, my Trust Center Settings are as follows:

    - "Trusted Locations": Was by default empty. I tried whether adding the Word STARTUP folder makes a difference but it didn't.

    - "Add-ins": All 3 boxes were unchecked by default.

    - " Macro Settings": By default set to "disable all macros with notification". I set it to "enable all macros"

    I guess those are all the relevant security settings for running add-ins in Word?
  • Yes, although Trusted Locations being empty is weird. This is what mine look like by default https://www.dropbox.com/s/agz4qfyz1j0zcqr/trusted_locations.png?dl=0

    You could also try putting Zotero.dotm under the User Templates directory.
  • I added all the folders in your trusted locations to mine. The Application Templates folder for me was under a different location at C:\Program Files\Microsoft Office\root\Templates but I guess that doesn't really matter.
    I also tried running Zotero.dotm from the User Templates directory but no success.

    Thanks for all the suggestions though. They are much appreciated since I am really getting a bit clueless with this issue...

    Btw: I also just tried installing Office 365 64-bit (before, I used the 32-bit version) but the issue remains.
  • My experiences are very similar to @norazi here - I checked add-in permissions, macro, moving the dotm etc and still it doesnt work. Also tried with both 32- and 64-bit versions of Office365. So I tried switching to Mendeley, but had fatal problems to get their Word plugin to even start and connect to Word!

    So as said above: seems like M$ has done some changes. Maybe this is intentional, as they rather would prefer people to use their own integrated refereence manager?
  • This is certainly just a bug. You should try reaching out to Microsoft if possible. The more people complain to them, the more likely that this will get resolved.
  • At least this is not exclusively a Zotero problem. I tried with the Mendeley Word plugin and got the exact same 5097 error...

    For the time being, I guess I'll use the Zotero in Google Docs which is a bit slow but works fine. The citations and bibliography can be copied into or downloaded as a Word document afterwards (however only unlinked).
Sign In or Register to comment.