I'm trying to find the best way to automatically create hyperlinks within a document from an in text citation, "(Author, 2014)", to its respective bibliographic entry in such a way that is seen in come journal articles. I'm currently working in with Word 2013 using its built in reference manager, as well as Adobe Acrobat Pro, and have been able to manually link citations to the bibliographic entry.

Is there any way to do this with a more efficient process?


This isn't a perfect solution. (You need to create the bookmarks after the bibliography is finalized, because updating the bibliography field deletes some of those bookmarks.)

Creating Bookmarks

First, create bookmarks for each one of the references in your bibliography. To make things easier, toggle the field codes for an in-text citation and give each entry in the bibliography the same name as the corresponding source. Word generally uses the first three letters of the author's name and the last two digits of the date. For example, in the document I'm testing this on, one of my sample sources is "Doe, J. (2013) A Book About Stuff." When you toggle the field codes on the in-text citation, it shows up as {CITATION Doe13 \|1033}. So, I named the bookmark for that index entry Doe13.

Macro for Adding Links

Next, I created a macro for adding the links to each citation.

Sub LinkCitetoSource() ' ' LinkCitetoSource Macro ' Automatically links an in-text citation to the corresponding bibliography entry. ' Dim fld As Field Dim citation As String Dim bkmrk As String For Each fld In ActiveDocument.Fields If fld.Type = wdFieldCitation Then citation = fld.Code.Text bkmrk = Mid(citation, 11, 5) MsgBox prompt:=bkmrk fld.Select Selection.Expand Unit:=wdWord ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:="", SubAddress:=bkmrk End If Next End Sub
  • Great, this seems to work well. One problem though, when it creates the hyperlink, it looks like the whole sentence before the citation is also hyperlinked. Can you recommend a fix for that? – Dylansq Dec 18 '14 at 0:16
  • 1
    I'd apparently copied a previous version of the macro, where I used the wrong unit to expand the selection. I changed it from wdSentence to wdWord, which should work. – Kelly Tessena Keck Dec 18 '14 at 12:48

The much easier way to do this is to click on the reference in the text and select "convert to static text." Then you can edit the text anyway you want, but it leaves the reference in the reference list, and you can still add the "dynamic" reference in the text later. It isn't ideal, but it doesn't entail programming

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.