Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8055681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:27:56+00:00 2026-06-05T08:27:56+00:00

I have a document with many acronyms that need to be captured and put

  • 0

I have a document with many acronyms that need to be captured and put into an acronyms table at the end of the document.

The term acronym has various meanings. I’d like to create a table that has all of the words that are initialized; two or more capitalized letters that are short for a longer meaning. I.e., CD-ROM, USB, SYNC, MMR, ASCAP, etc.

How do I create a macro to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T08:27:59+00:00Added an answer on June 5, 2026 at 8:27 am

    Something like this might get you started. Add a reference to “Microsoft VBScript Regular Expressions” (Edit Macro: Tools > References). This library is the file, “vbscript.dll”.

    You may need to adjust the regexp if all your acronyms aren’t only upper-case letters (eg some may contain numbers).

    Sub Acronyms()
    
        Dim dict, k, tmp
        Dim regEx, Match, Matches
        Dim rngRange As Range
        Set regEx = New RegExp
        Set dict = CreateObject("scripting.dictionary")
    
        regEx.Pattern = "[A-Z]{2,}" '2 or more upper-case letters
        regEx.IgnoreCase = False
        regEx.Global = True
        Set Matches = regEx.Execute(ActiveDocument.Range.Text)
        For Each Match In Matches
            tmp = Match.Value
            If Not dict.Exists(tmp) Then dict.Add tmp, 0
            dict(tmp) = dict(tmp) + 1
        Next
    
        For Each k In dict.Keys
            Debug.Print k, dict(k)
        Next k
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a document containing many quotation marks. I need to replace all pairs
I have the following one to many associations. Document has many Sections and Section
I have many collections of documents in a mongo database that look like this:
I have many layers in the Documents that will be displayed on different user
I have a document library in MOSS 2007 which has folders and files. Document
I have a document-based Core Data app. My main Core Data entity has several
I have a document that I want to be flipped / rotated 180 degrees
I have a document containing many marks, but I want to convert it for
I'm writing an application that faxes a document (many supported types) provided by the
I have a Word 2007 document with many sections. Each section enables / disables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.