A way to delete all citations

So, I needed to delete all the citations in my Word document. I couldn't find any documentation on how to do this. My solution was to make a Visual Basic script that deletes all field codes (make sure your document is using field codes for citations!).

If you are in the same situation, give this a try:

1. While in your document, press Alt+F11 to open visual basic. You can also do this from the Developer tab, if you have it enabled.

2. From the Insert menu, click "Module".

3. Paste in this code:

Sub removefieldcodes()
Dim fc As Field
For Each fc In ActiveDocument.Fields
fc.Delete
Next fc
End Sub

4. Press the little "Play" symbol (green triangle) in the toolbar.

5. Go back to your word document. All the citations should be removed.

If there's a different solution built into Zotero, please let me know!
  • edited May 15, 2020
    You can unlink citations so they're just plain text.
    That won't remove the text, but I'm having trouble understanding why you'd want to remove them. Would your document make sense, or even your individual sentences with missing citations? Wouldn't the spaces around the citations not be removed with your macro?

    If you're simply removing the documentation for background information, I guess that could work (but why, because using the document for any purpose would constitute plagiarism by definition), but if there's any integration of sources the discussion would make no sense like "As shown by several studies..." without any citations? Unlinking seems much more useful to me. But up to you I guess!
  • My use was because I needed to verify word count minus citations. I've seen others with the same use case.
  • Oh, I see! Would converting to a note style help at all? One problem would still be the spaces around the cites, and that's also a problem with your macro. Does Word include punctuation separated by spaces as separate words in the word count? I can't think of an easy automated way to do that, unless you add in some find-replace operations to remove those spaces, which might be tricky.

    Another possibility would be to do a null style, where no output is generated in the cites, although I'm not sure how well zero-width fields would work in Word.

    Regardless, don't most publishers include citations in the length limits? They may not include the bibliography, but that's easy to remove.
  • Yeah, the easiest way to count words without citations would be to switch to a note style like Chicago, then use Word count and uncheck the “include footnotes” box.
  • Oh nice. That Chicago/footnote strategy sounds like it'd get the job done, too. Might be easier for people that are afraid of Visual Basic, too.
Sign In or Register to comment.