The below VBA macro counts the words in a Microsoft Word document, excluding the following:
Appendices
Reference list
Bibliography
(Optional) Any specific sections
(Optional) Exclude Any Specific Sections
Identify the number of sections you have: you can find all the section breaks in the doc by pressing CMD/Ctrl + F and searching for ^b. If you press the next/previous occurrence button, it should stop at each section break (the section breaks are invisible, so it may take a couple of times to determine the section numbers accurately).
Update the section index number in the code: for example, I have 12 sections in my document, and I want to exclude the last 4 sections (References, List of Tables, List of Figures & Appendices, I would set objSection.Index > 8 in the code (please see code below).
I’ve included a debug message at the end of the popup dialogue so you can verify whether you’ve counted the sections correctly.