AI to the rescue: Creating a list of acronyms

Scripts
Word
AI
Developing a Word VBA script to generate a list of acronyms
Author

Evangelia

Published

May 17, 2025

Vibe coding is an emerging trend in AI-supported software development, which, compared to other AI applications, has received little attention from Monitoring Evaluation Research and Learning (MERL) professionals. It’s a simple but powerful idea: you describe what you want to solve in plain language, and the AI writes the code to make it happen. I have been experimenting with vibe coding for data analytics and interactive, digital, reporting, and for making everyday tasks easier.

One example? Creating acronym lists for long documents. It’s one of those thankless, time-consuming tasks that usually gets pushed to the very end of the process.

With ChatGPT’s help I created a VBA Macro for Microsoft Word, which:

a) Scans the document and generates a list of acronyms, including the page number where each first appears;

b) Tracks how many times each acronym is used.

The resulting acronym list gets exported to a new Word document, ready for formatting or whatever comes next.

Instructions:

  • Copy the VBA macro
  • Make sure your document is open and editable.
  • Open the Visual Basic Editor (tip: type in ‘vba’ in the search bar in Word).
  • In the editor go to Insert > Module.
    • Paste the VBA code into the new module window.
    • Click outside the module and go to Run > Run Macro.
  • In the pop-up, select ExtractAcronymsWithPages and hit Run.

If everything runs smoothly, Word will generate a new document with the compiled acronym list.

Note that there is a setting in the code that allows you to exclude certain words: just add them inside the double quotes in ignoreList = Array(" ").

I’ve tested the macro on both Windows and Mac versions of Word—it works great on both. I hope you find it useful.