Word intergration with wine

24
  • Here is a link to the Zotero.dot that is modified to work within WINE. And it really does work very well (see limitations in the above posts), I use it on a regular basis. Thanks to jackflap!
    https://drive.google.com/file/d/0B-FGaNOW8dnudEpuZDdnNnBVUmc/edit?usp=sharing
  • I tried installing Word 2003 under wine (as packaged for Debian testing, i.e 1.6.2) and Zotero Standalone (4.0.17). I used the Zotero.dot file as provided by matthias.hilty, modified it to let him find and use zotero.exe : it works correctly.

    This gives me ideas :

    1) since this modification of Zotero.dot seems relatively innocuous, I'll try to create a diff between this modified version and the original one. Re-applying it against updated version of the Word plugin should give something utilisable under wine.

    2) This could lead to an "easy" "Zotero for Word under Wine" plugin, which *might* be easy to maintain.

    3) Since the "sweet spot" of this plugin is the interprocess communication, I wonder if it is possible for a Windows application to communicate with a Linux application (maybe by opening a socket ? Does someone knows how the Libreoffice plugin communicates with Firefox or Standalone under Linux ?). This could lead (even better !) to a "Wine plugin" where Word (under wine) would communicate with Firefox|Iceweasel|Zotero Standalone running under the hosting Linux. No sync lap !

    This is probably a "niche" corner case : I have to use Word (sometimes) to interoperate with colleagues (including my boss, alas...) who adamantly refuse to touch anything Libreoffice-related, but my main work platform is Linux. I think that I am not alone in this predicament, but we are probably not a majority of Zotero users...

    Reactions ?

    PS : a gripe : in my (french) setup, Word uses the "Bibliographie 1" style for formatting the bibliographi, whereas Libreoffice seems to insist on the "Bibliography" style... Hence a mess. Any idea ?
  • @charpent

    Thanks for following up with this. Although a niche, it would be of great benefit if Linux users could just rely on a Wine implementation instead of having to run a separate virtual machine. Thus I totally support your idea.

    As a starting point, do you want to set-up a Github repo to which everyone can contribute?

    Cheers
  • @orschiro : up to now, I don't have much to contribute. I looked into the "original" Zotero.dot, and found that the code is locked. I don't know how to unlock it (but my experience with Visual Basic is essentially zilch : I haven't seriously touched Windows since the last millenium).

    My idea of working with Linux's Zotero might work, but currently hits a bug in Wine. In recent versions (1.6.x and later), Wine can no longer call Linux executables (see my comment on the relevant bug report at http://bugs.winehq.org/show_bug.cgi?id=34730).

    I'll have to think back a bit on this one... Anyway, since we have a "proof of principle" realization, it might be worth for the Zotero staff to consider a "Zotero plugin for Wine", either for Linux's Zotero or for Window's Zotero.

    An idea : since the Zotero plugin for Open|LibreOffice uses TCP for communication with Zotero|Firefox (even on Windows if I understood correctly my various sources), could this piece of software be reused in this hypothetical "Zotero for Wine plugin" ?

    Your thoughts ?
  • Hey guys,

    this is a very interesting thread. I recently got back to Ubuntu from Windows 7/8 and it would be amazing if I could get MS Office 2010 (installed through PlayOnLinux) work with Zotero Standalone (also installed through POL, since I figured that it's probably impossible to get a POL Office and a native Zotero to communicate?).

    What's the current status? Anyone got Word-Zotero working and communicating or is Virtualbox the only real solution so far? If anyone got this to work outside of VBox, could you explain how? I'm not a beginner, but I also don't have any programming or an in-depth linux knowledge.

    Thanks a bunch!

    Cheers,
    Dom
  • edited May 28, 2014
    I got this working with Crossover 13.1.0-1, Word 2010, Zotero 4.0.20. Using Zoterio stand alone version in Crossover and the Zotero.dot made available by matthias.hilty above. I installed Zotero in the same bottle as Word.

    Two catches:

    1) When you open the Zotero.dot to edit it as suggested above do not click on it in the file manager. You have to open it from Word using File, Open, etc. Thereafter go to View, Macros, View Marcro, Edit. I changed the 6th and 7th last lines to look like this:
    If Dir("C:\Program Files\Zotero Standalone\zotero.exe") <> "" Then
    Call Shell("""C:\Program Files\Zotero Standalone\zotero.exe"" " & args$, vbNormalFocus)

    I.e. I only changed the files to which it points.

    2) Also, remember you have to have the Windows version of Zotero running for it to work in Word.

    Hope this helps.
  • Hey grovesteyn,

    thanks a lot for your explanations! I followed your steps and it seems that the communication is working (I get no errors), but unfortunately it still doesn't work. When I try to add or edit a citation either nothing happens or the Zotero citation window pops up for half a second but disappears again right away. This is also the behaviour with other functions like 'bibliographic management'.

    I use PlayOnLinux and got Office 2010 + Zotero in the same virtual drive.

    Any ideas? If not, no problem. Thanks again!
    Dom
  • ohremd, the other option you might try is to install the free demo version of Crossover Office and give it a try as I have explained above. If it works, getting a basic licence is cheap and supports open source WINE development.
  • Hey grovesteyn,

    I tried with Crossover and it works! Thanks a lot!

    Unfortunately though, I often get an error when performing certain actions. I'm not sure when exactly the error occurs, but one trigger seems to be inserting a new citation with 2 or more entries. Also, it sometimes occurs when changing bibliographic styles. This is the error message:

    ---

    Zotero experienced an error updating your document.

    Word was unable to read this document. It may be corrupt.
    Try one or more of the following:
    * Open and Repair the file.
    * Open the file with the Text Recovery converter. code: "0"
    function: "zoteroWinWordField::SetText" location: "zoteroWinWordField.cpp"
    Word was unable to read this document. It may be corrupt.
    Try one or more of the following:
    * Open and Repair the file.
    * Open the file with the Text Recovery converter. code: "0"
    function: "zoteroWinWordField::SetText" location: "zoteroWinWordField.cpp"' when calling method:
    [zoteroWinWordIntegrationErrorHandler::throwError]

    ---

    I have no idea what this means... :)

    But still: Thanks a lot, this is already a massive improvement of my working situation.
  • Just as an update: I'm really happy with the way everything works and the Zotero errors did not occur anymore. I suppose I could reproduce them somehow, but I've been working with Zotero during the last days and everything went smoothly. The Crossover Zotero even communicates with my native Google Chrome for some reason :)

    So, if POL and Office 2010+Zotero doesn't work for you, give CrossOver a shot! Check out the 2 weeks trial and if you're satisfied, buy the program. You might even find a discount code somewhere (they actually send me a 25% off coupon during my trial period).

    Thanks again to grovesteyn and all the others in this thread.
  • edited June 30, 2014
    I am assuming it is ok to post in this thread. I use Office on PlayOnLinux, and got zotero to work...it might be good for me to post instructions.

    As a disclaimer, I followed this thread, so all the credit goes to jackflap and whoever worked on the dotfile. I am using the dotfile posted by matthias.hilty, please tell me if it is inappropriate to include the link (I think it is more helpful to make my post self-contained).

    INSTRUCTIONS TO USE ZOTERO THROUGH PLAYONLINUX:
    1. Install Office 2010 through PlayOnLinux (I used an original DVD).

    2. Download the firefox installer(I got 30.0, the latest, from http://www.mozilla.org/en-US/firefox/all/ ).

    3. On PlayOnLinux, go to File>Install, then click on Install a non-listed program.
    &nbsp&nbsp&nbsp3.1. Click Next. When given the choice, select "Edit or update an existing application" and click Next.
    &nbsp&nbsp&nbsp3.2. Toggle Show Virtual Drives, and select the drive where office is installed (I kept the default, "Office2010"). Click Next.
    &nbsp&nbsp&nbsp3.2. We don't need to change anything to wine (1.6 as used by office works fine). Click Next.
    &nbsp&nbsp&nbsp3.3. Select 32 bit windows Installation. Click Next.
    &nbsp&nbsp&nbsp3.4. Browse to the firefox installer that you downloaded in step 2. Click Next.
    &nbsp&nbsp&nbsp3.5. Following the installation should be straight forward. When the PlayOnLInux installer prompts you to add a shortcut, make sure you add the firefox exectuable.

    4. We should have Firefox available now on PlayOnLinux. Run it, and go to the zotero website to download the extension...install the zotero exension normally. Restart Firefox.

    5. In Zotero, go to Peferences>Cite>Get word processor plug-ins..., and install the one for windows. Restart Firefox.

    6. Go to "~/.PlayOnLinux/wineprefix/Office2010/drive_c/users/%user%/Application Data/Microsoft/Word/STARTUP/" and replace Zotero.dot with the one posted previously by matthias.hilty: https://drive.google.com/file/d/0B-FGaNOW8dnudEpuZDdnNnBVUmc/edit?usp=sharing
    ****NOTE: in the directory above, %user% is YOUR username. The directory might vary

    7. Run Firefox. Run Word...Everything should work!

    Note 1: I run into an error when I try to insert the bibliography when I only have a single citation in the document...As soon as I have a second one (or more), everything runs perfectly. I don't know what causes this, but it doesn't affect me.

    Note 2: Details. Fedora 20 / Playonlinux 4.2.2 / Wine 1.6 / Firefox 30.0 / Zotero 4.0.21.5 / Zotero Word for Windows Integration 3.1.16

    Please let me know if you run into any issues, I can edit this if I made mistakes. I will add notes as I use zotero and find any quirks or problems.

    I tried to hilight the important parts for people who might be comfortable with not reading every tiny detail. I tried to minimize html abuse, but if this is annoying, I can make everything plain text.

    Have a great day.
  • Thank you! I've switched to linux at home but when not working from home I use word. For a while I've been switching from Libreoffice to MS word and saving as bookmarks instead of fields, manageable but quite inconvenient! It looks like with the above fix from matthias.hilty I'll be able to go back to work properly again! Thanks a million
  • The instructions of mbfraga works perfectly!! Great job!! I'm using Office 2010, Firefox 31.0 both installed using Play on Linux.

    It would be nice if we had available a Zotero.dot file designed to Zotero Standalone also.

    But Zotero as plugin of Firefox works pretty well in Play on Linux environment. :)
  • Unfortunately none of the download links to the modified Zotero.dot work for me. Google Drive complains on Quota Exceeded when I am trying to access the modified Zotero.dot. All older links to the file appear to be dead. Could someone please provide this modified file via another platform or a new Google Drive link. I would be willing to host this file on a proper server or add it to Github if I can get my hands on it and if it actually works.
  • edited September 24, 2014
    Found this through some extensive Googling: https://gist.github.com/jbeard4/4747615

    Edit: The above file indeed works! To add the code to Zotero.dot simply rename the file to Zotero.doc and open it using Word. Go to the VB editor and replace the code with the given code. Save the .doc file and rename back to Zotero.dot. Restart Word and let the magic begin. Using Zotero Sync adds the final finishing touch to the whole solution.
  • I love you all.

    With the custom Zotero.dot above, I've got this working with Word 2010 (32-bit), Firefox 33.1, Zotero 4.0.23 and Zotero Word for Windows Integration 3.1.17 all running under Wine 1.6.2.
  • I followed the instructions posted by mfbraga, and it works (using Firefox 35, Zotero 4.0.25.2 extension, Word for Windows Plugin 3.1.18 extension). Thanks!

    Just one extra note: if your Office 2010 installation uses another language, there is a language-specific folder besides STARTUP containing the Zotero.dot file, so you need to put the customized version there as well.
  • Hi all,

    First, I want to say that it is a very good job.

    I experienced a very little problem with office 2007 (because I have the licence) and Crossover(because it was very useful before).

    I use Firefox 33.1, Zotero 4.0.25.2 extension, Word for Windows Plugin 3.1.18 extension.

    When I close word, I have a crash report. It not a real problem because everything is saved and zotero works well when the document is re-opened but it seems that something in the macro does not stop and might produce this crash. So, this alert is just annoying

    But many thank for your work

    It is very useful
  • If you are using the standalone version use this dot file.

    https://drive.google.com/file/d/0B3-4RMGDoOO4QXg3ZXRZYXpVT00/view?usp=sharing

    The dot file shared by mbfraga works only with firefox, I have edited the same to work with the standalone version.
  • srinivasv,

    Thanks for doing this. Will this work with standalone installed in linux proper, or just standalone installed in Wine?

    T
  • It will work with standalone installed in wine.
  • I got a new hard drive and will have to do this process again. I will see if srinivasv's dot file works with the procedure I posted and will edit my post in case that someone tries to use that link.

    I should also note that with my method there is a quirk where a swap file ~Zotero.dot will be created and sometimes not removed (probably due to a crash or something). Word will then complain about it every time it runs. It doesn't affect functionality, but it is a cosmetic artifact.
  • Hello. I'm having the strangest issue, that keeps pointing to different users being used for Word and Zotero Standalone.

    "Zotero experienced an error updating your document. Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [zoteroIntegrationApplication.getDocument]"

    Funny thing, it works for the first link. I can get the citation in word to work. When I go to the second. Bam this error.
    CXoffice is running zotero as "Public" and Word as "crossover" user.
    I now run zotero as "crossover" and bam it works first citation...then ...same error again.
    Did anyone have this problem?

    I'm using Word 2010 and latest zotero to date.
    Oh and normal Zotero.dot from Standalone worked out of the box.
    (yes I tried to modify the links to Standalone and I still have this annoying error).
  • edited September 20, 2015
    THANKS, THANKS, THANKS to everyone that contributed to this.

    One final touchup to make things even better.

    I usually work off my Zotero standalone, with a profile at /home/USER/.zotero and I would really like to be able to access that library from whichever Zotero installation I have on my PC.

    When I tried to define the path through Firefox (for Windows) add-on, I would never get the hidden .directories, and to make things worse, the whole thing would sometimes freeze when I searched for the directory.

    So as a workaround, open the Zotero addon from Firefox (for Windows) and select Actions > Preferences > Open about:config
    Promise you'll be careful and then search for the string "extensions.zotero.dataDir". Give it the value Z:\home\USER\.zotero\zotero\<randomstring.default\zotero

    ...and bingo!

    You have access to the database you worked so hard to create...
  • Dear all,

    I am about to start a new project and would like to know whether the method described in this thread still works for Wine with Office 2010 and Zotero Standalone Linux as of now.

    Thankfully,

    ~Robert
  • I have added some detailed installation instructions to the Wiki:

    https://www.zotero.org/support/word_processor_plugin_troubleshooting?&#linux

    Warmly,

    ~Robert
  • Hello,
    Thanks for all your work !
    However, with the last version of Firefox/Zotero, the Zotero.dot is now Zotero.dotm.
    So when I try to use the Word module, it says something like "Impossible to use the Zotero.dotm file" (I don't remember the exact error message, it wasn't on my computer).
    Is it possible to cope with this issue?

    Thankfully,

    Thomas
  • edited May 1, 2016
    Hello,
    I tried to follow the installation instructions in the Wiki, but it's not working. The only place where there's a Zotero.dot is
    /home/%user%/.wine/drive_c/users/%user%/Application Data/Mozilla/Firefox/Profiles/k1og3i0m.default/extensions/zoteroWinWordIntegration@zotero.org/install/Zotero.dot
    If I paste the downloaded Zotero.dot in the folder
    /home/%user%/.wine/dosdevices/z:/home/%user%/PlayOnLinux's virtual drives/Office2010/drive_c/users/%user%/Application Data/Microsoft/Word/STARTUP
    at least I see the Zotero buttons in the Addins tab in Word. Zotero in the Wine-Firefox is working flawlessly.
    If I also install Firefox via PlayOnLinux it still doesn't work.
    I hope someone can help, to get it working is very important for me.

    Thankfully,

    Grebuko
  • Hello,
    a friend changed the folders for me and now it's working perfectly fine.
  • OK, just some new behavior in case someone is interested.

    My platform: Ubuntu 12.04, LO 5.0.6.2, Zotero 4.0.29.10, with MS 2010 and Firefox 46 for Windows installed through Playonlinux in the same wineprefix. FF for windows is wearing the Zotero 4.0.29.10 addon and Word for Windows 3.5.5 integration addon.

    Actually, I was updating from some previous versions, so I updated those addons as well.

    For Word 2010 to work correctly do the following in that order:
    -update everything you need to
    -reinstall Word integration tool from Zotero

    At this point you will get a communication error when you try to use the "Zotero" tab in the Office strip.

    -copy the Zotero.dot file to the appropriate directory as described in https://www.zotero.org/support/word_processor_plugin_troubleshooting?&#linux

    You will notice that it goes alongside Zotero.dotm

    -Restart Word 2010 and you will now notice two Zotero tabs, one called "Zotero" and one called "Add-ins". The "Add-ins" one is the one that actually works!

    That was the one I was getting before my updates. It seems that the .dotm file is not working (throws the communication error).
Sign In or Register to comment.