Run-time error: '5'

I cannot get Zotero into Word 365. I see the buttons but when I start it, I have an error message: "Run-time error: '5': Invalid procedure call or argument." Then I debug it to open Visual Basic. There it shows a highlighted row: MacScript "try" & nl$ & "do shell script """ & pipeLocation$ & "; if [ -e \""$PIPE\"" ]; then echo '" & wordVersion$ & " " & func & " "" & POSIX path of (path to current application) & ""' > \""$PIPE\""; else exit 1; fi;""" & nl$ & "on error" & nl$ & "display alert ""Word could not communicate with Zotero. Please ensure that Zotero is open and try again."" as critical" & nl$ & "end try"

Can I change the text somehow to get it to work or can you provide me with another dotm file?
  • Could you try installing this Zotero.dotm file and see whether it fixes the problem?
  • Thank you! But it still does not work :(
  • Is it still the same error message? If not, could you copy the new message?
  • Yes, exactly the same message: "Run-time error: '5': Invalid procedure call or argument."
  • If you open the Visual Basic editor, which line does it fail on?
  • This one almost at the end: currentPath = MacScript("tell application ""Finder"" " & nl$ & "POSIX path of (path to current application)" & nl$ & "end tell")
  • I am having the exact same problem at the same line of code. I have gone down all the advice on this page - - to no avail.
  • Which Word version exactly?
  • @aburgart what is the path to your Word application (e.g. "/Applications/Word")?
  • Debug button is not working when you put your file into the startup folder and it gives the error message. It works only when you open the .dotm file.
  • @agnes123 What is the path to your Word application?
  • WINWORD.EXE is in the folder: C:\Program Files\WindowsApps\Microsoft.Office.Desktop.Word_16040.11001.20108.0_x86__8wekyb3d8bbwe\Office16

    Default sartup folder is: C:\Users\Agnes\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\LocalCache\Roaming\Microsoft\Word\STARTUP
  • Wait.. Why do you have the Word for Mac template installed into Word if you are on Windows. Did you manually install it? You should use the Word for Windows Zotero plugin along with the relevant Word template file.
  • I took Zotero.dotm file from the folder: C:\Program Files (x86)\Zotero\extensions\\install

    and copied it to the startup folder that Word 365 has (see up)

    as explained here in the first section:

    And then it shows the error message. Zotero itself works fine with, also with the Chrome. Maybe I installed the whole Zotero wrong (if it is possible?)
  • Something is wrong with your Zotero installation. In your original post you cited an error that could only occur if you used a Zotero.dotm file intended for Word for Mac, which you normally cannot get, unless you download the Zotero macOS version, or download it from the plugin github repository.

    Remove the Zotero.dotm file the you currently have in your Word startup folder. Uninstall Zotero, download it and reinstall (this will not remove your Zotero data). Then go into Zotero Preferences -> Cite -> Word Processors and reinstall the Word plugin. Restart Word and see whether it shows up and whether it works now.
  • Did that! I only reinstalled the word plugin in Zotero program. In this case, the Zotero tab does not appear in Word at all.

    Zotero tab only appeared when I copied the file in the Word startup folder, which is very different what you say it would be on the webpage. Maybe that is the reason?

    Now in this folder: C:\Program Files (x86)\Zotero\extensions\\install
    I still have two files ( and Zotero.dotm).
  • What is the path to your Word startup folder? What version of Word is this? Ideally you would set your Word startup folder to the default location and let Zotero handle the installation, but otherwise, you should try the manual installation steps again.
  • My problem is solved :) Thank you for your trouble! After reinstallation and moving the Zotero.dotm file into the startup folder seemed to work!
Sign In or Register to comment.