MS-Word Macro to convert Zotero citations into clickable Hyperlinks

No doubts that Zotero is a nice piece of software but last time I used it while writing an international grant proposal (French-German ANR-DFG call) I could not find a simple way to turn Zotero's citations into clickable Hyperlinks (but many post on the forum). As I was in a hurry I had to do it manually… Not very convenient and interesting.
It is a real shame that Zotero do not provide an easy way to generate clickable citations with Hyperlinks that points the DOI address of the cited work (long live LaTex!). Hyperlinks are the root of internet and I cannot understand why such basic features are still lacking in all days softwares in this year 2019...
In order to circumvent this missing feature I wrote a MS-Word macro that operate together with modified Zotero style.

Step1:
In brief, you need to modify your preferred Zotero style in order that your citations appear between 2 text marks: "#c1#" and "#c2#" that mark respectively the

start and end of a citation. In addition, you need to modify your preferred Zotero style in order that the corresponding internet address (you want the

Hyperlink to point to) appears right after the citation between 2 text marks: "#a1#" and "#a2#" that mark respectively the start and end of an address.
For example I modified the nice "Minimal style for grant proposals" authored by Anton Crombach to support these 2 modifications:
- on line 78 I added a prefix and suffix for the bibliography layout group :
- after the bibliography layout group I added a text variable that will display the DOI between the 2 text marks discussed before:

Step2:
Use Zotero as usual to add citation to your MS-Word document. Again, as usual once at the end of your writing add the bibliography and use your preferred

Zotero style that you modified in step1 to have text marks appearing in the bibliography. In principle your bibliography should look like this:
#c1#citation1#c2##a1#address1#a2#
#c1#citation2#c2##a1#address2#a2#


Step3:
Unlink Citations. As usual you may want to save your work with a different filename before this step as it cannot be reversed!

Step4:
Run the following macro that will automatically recognize the citation fields and address fields and generate accordingly the hyperlinks (and remove the text marks).

Here is the link to download a 7zip archive that contain the files:
- Readme.txt : a txt file that contains the instructions.
-ZoteroToHL_macro.txt: a txt file that contain the macro for MS-Word.
-minimal-grant-proposals-for-ZoteroToHL.csl : the minimal-grant-proposals Zotero style modified to work with the MS-Word macro.
-ZoteroToHL_testfile.docx : a MS-Word file that I used to test the macro.

The link:
https://seafile.unistra.fr/f/307e02532d88453aaca2/?dl=1

The password: ZoteroToHL
Sign In or Register to comment.