zotero / zotero-word-for-windows-integration

Zotero Word for Windows integration
https://www.zotero.org/support/word_processor_plugin_usage
Other
49 stars 24 forks source link

Zotero Word for Windows Integration

This is a Firefox add-on that consists of a library written in C++ that communicates with Microsoft Word out of process using OLE Automation, a js-ctypes wrapper for said library, and a template that is installed into Microsoft Word to communicate with Zotero.

C++ Library Build Requirements

To Build the C++ Library

Template Build Requirements

To Modify/Build the Templates

Development Starter's Guide

Start by opening the dotm/dot template in Word. Word templates have support for custom macros and adding UI elements to call the macros, which is how the extension is implemented on Word. RibbonUI can be edited by extracting the dotm file or using the Custom UI editor. To edit the .dot template UI Word for Windows 2003 is needed. In VBA macro code you will find that SendMessage protocol is used to issue commands to Zotero process from Word. These commands are received in zotero-service.js where they are passed to integration.js.

Zotero talks to Word via js-ctype bindings to a C++ OLE Automation based library. To generate new interfaces for Word interop communications you should use the Add New Class wizard in Visual Studio and select 'MFC Class from Typelib'. The interop API docs can be found in the MSDN. The plugin should technically work with Word versions starting with 2003, but we have stopped supporting everything below Word 2010 due to impossible to fix bugs cropping up as time goes on and Microsoft drops compatibility themselves. Some API calls are on a deprecation path, so we may be inevitably be forced to move away or split the library into multiple DLLs.