Word count for a section?
January 7, 2020 3:25 PM   Subscribe

I use Microsoft Word to write papers on different subjects with several co-authors. I'd like to be able to keep a running updated word count for different sections (specifically, abstract and manuscript) on the title page, to ensure that we stay within the word limit for whatever journal we're targeting. Is there a way to make Word do this?

Yes, I can highlight whatever bit of text and check its word count, but that gets tedious and I was hoping to automate the process. Ideally, the solution would automatically update when the file is open and/or saved, so anyone editing would be aware that they are coming dangerously close to max allowed length on a given section and would think twice before adding text. (I admit my secret agenda is to minimize the current drama of having to cut out someone's contribution because of space issues.)

I know how to insert dynamically updated fields into a document, including total word count; unfortunately there is no field for section word count. I did find this code for a macro that seems to do what I want, but where do I insert this?

The primary computer I'm using has Word 2016, although I also have access to Office 365 on my laptop and sometimes make edits there as well. Some co-authors are at my home institution with the same version of Word; some are at other universities. But for the purposes of this, assume we're all using either 2016 or 365. Files are emailed back and forth, but there's always one master copy that belongs to the first author. Unfortunately Google Docs, which I'm pretty sure does dynamic section word counts, broke the reference management software, and manually editing/adjusting 50+ citations is a whole nother level of hell.
posted by basalganglia to Computers & Internet (1 answer total) 2 users marked this as a favorite
 
To use a macro in an Office document, you need to make the Developer tab visible:

1. File > Options > Customize Ribbon
2. In the list on the right of the screen, check the Developer tab box, and click ok to return to your document.

To paste the linked code:

1. Click the Developer tab, and then click the Visual Basic icon.
2. Paste the code (be sure to include the beginning line "Sub WordCount()" and ending line "End Sub".
3. Close the Visual Basic editor with the little X at the upper right.

To execute a macro:

1. Developer tab
2. Click the Macros icon on the ribbon, and click the desired macro from the list.
3. Click Run.


You'll probably find that you will have to save the document as a macro-enabled .docm file, instead of the default .docx. This can be difficult to explain to a non-techie person.

Another potential issue is email systems often strip macro-enabled attachments (or flag them as malware/suspicious). So you may find that emailing drafts will be annoying or may not work at all, unless the people involved can figure out how to allow them through their email filters.

OneDrive is Microsoft's version of Google Drive, to allow collaboration without emailing. I am unfamiliar with how OneDrive handles macros though.
posted by SuperSquirrel at 6:04 PM on January 7, 2020


« Older DIY Stickers for Your Face   |   Spreadsheet to calculate what can be made based on... Newer »
This thread is closed to new comments.