Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Auto Creation of an Acronym List.

Auto Creation of an Acronym List

Written by Allen Wyatt (last updated October 19, 2023)
This tip applies to Word 2007 and 2010


15

Karl works in an occupation that uses a lot of acronyms. Their standard procedure is to define the acronym only the first time it's used within the document. In addition, they always need to create an appendix, at the end of the document, listing the acronyms in alphabetical order along with their meanings. Karl is looking for a way to perhaps "mark" the acronym in the main body and have the acronym appendix be automatically created.

There is no way to do this directly in Word. There are several types of tables you can create automatically, such as tables of contents, tables of authorities, and indexes. These last two tables (tables of authorities and indexes) could possibly be used to create the acronym list, but only if they are not already being added to your document and only if you don't mind your acronym list including page numbers.

If you want to use the table of authorities tool in order to create an acronym list, Shauna Kelly has put together a great article on how this can be done. The article specifically talks about glossaries, which essentially what an acronym list would be.

http://www.ShaunaKelly.com/word/glossary/glossary.html

If you want to use the index tool in order to create your list, you can follow these general steps, assuming that the acronym, when defined, is followed by its meaning within parentheses:

  1. Select the acronym and its meaning. This means that you find the first instance of the acronym in your document and then select that acronym along with the parenthetical meaning that follows it.
  2. Press Alt+Shift+X to mark the selected text for the index.
  3. Repeat steps 1 and 2 for the other acronyms you want in your list.
  4. At the end of your document, insert your index. How to actually insert an index has been covered in other issues of WordTips.

You'll note that this approach leaves the parentheses in your index. If you don't want the parentheses, then you'll need to go to each acronym that you marked and display the field code used for the index. It will look something like this:

{ XE "abbrev (this is the definition)" }

Within the field code you can remove the parentheses so that the text appears just as you want it to appear in the acronym list. If you use the above method to mark only the first instance of the acronym—where it is first defined—then there will be a single page number for each acronym in your list. If you like the idea of having page numbers, but want them for all instances of each acronym, then you'll need to mark each occurrence of the acronyms—a much more involved task.

If you prefer not to use the either of the methods already described, you could create a macro that will aid you in creating your acronym list. The following macro essentially copies whatever text you have highlighted to the end of the document.

Sub Send_2_acronym_list()
    With ActiveDocument.Bookmarks
        .Add Range:=Selection.Range, Name:="xxxHERExxx"
        .DefaultSorting = wdSortByName
        .ShowHidden = True
    End With
    Selection.Copy
    Selection.EndKey Unit:=wdStory
    Selection.TypeParagraph
    Selection.PasteAndFormat (wdPasteDefault)
    Selection.GoTo What:=wdGoToBookmark, Name:="xxxHERExxx"
    Application.Run MacroName:="Normal.MoreNewMacros.EditGoTo"
    Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub

The idea is to select your first instance of the acronym, along with its definition, and then invoke the macro. A bookmark is set at the current location, the text is copied, the end of the document is selected, and the text added there. Then the bookmark is used so that the original location can again be selected.

When you are done "marking" your acronyms in this manner, you can select the text that was copied to the end of the document and format it (or edit it) in any way desired.

If you want an approach that is even more automated, then you may be able to create a macro that will scan through your document and extract any acronyms it finds. In order for an approach like this to work, you'll need to make sure that you religiously follow a rigid structure for your acronyms and their definitions. The following macro assumes that the acronym will always be a string of uppercase letters followed by a space and then some parenthetical text.

Sub ListAcronyms()
    Dim strAcronym As String
    Dim strDefine As String
    Dim strOutput As String
    Dim newDoc As Document

    Application.ScreenUpdating = False
    Selection.HomeKey Unit:=wdStory
    ActiveWindow.View.ShowHiddenText = False

   'Loop to find all acronyms
    Do
        'Search for acronyms using wildcards
        Selection.Find.ClearFormatting
        With Selection.Find
            .ClearFormatting
            .Text = "<[A-Z]@[A-Z]>"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindStop
            .Format = False
            .MatchCase = True
            .MatchWildcards = True
            .MatchWholeWord = True
            .Execute
        End With

        'Only process if something found
        If Selection.Find.Found Then
            'Make a string from the selection, add it to the
            'output string
            strAcronym = Selection.Text

            'Look for definition
            Selection.MoveRight Unit:=wdWord
            Selection.MoveRight Unit:=wdCharacter, _
              Extend:=wdExtend
            strDefine = ""
            If Selection.Text = "(" Then
                While Selection <> ")"
                    strDefine = strDefine & Selection.Text
                    Selection.Collapse Direction:=wdCollapseEnd
                    Selection.MoveRight Unit:=wdCharacter, _
                      Extend:=wdExtend
                Wend
            End If
            Selection.Collapse Direction:=wdCollapseEnd
            If Left(strDefine, 1) = "(" Then
                strDefine = Mid(strDefine, 2, Len(strDefine))
            End If
            If strDefine > "" Then
                'Check if the search result is in the Output string
                'if it is, ignore the search result
                If InStr(strOutput, strAcronym) = 0 Then
                    strOutput = strOutput & strAcronym _
                      & vbTab & strDefine & vbCr
                End If
            End If
        End If
    Loop Until Not Selection.Find.Found

    'Create new document and change active document
    Set newDoc = Documents.Add

    'Insert the text
    Selection.TypeText Text:=strOutput

    'Sort it
    newDoc.Content.Sort SortOrder:=wdSortOrderAscending
    Application.ScreenUpdating = True
    Selection.HomeKey Unit:=wdStory
End Sub

The macro looks through the document for anything it thinks might be an acronym. If it finds a candidate, it looks after it to see if it is followed by an opening parenthesis. If so, then everything up to the closing parenthesis is considered the definition for the acronym. Once the macro is finished going through the document, it creates a new document, adds the acronyms there, and then sorts them all.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10935) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Auto Creation of an Acronym List.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Setting Header/Footer Margins

Do you find that there is a lot of extra space around the data on your worksheet when it is printed? Changing the margins ...

Discover More

Sharing Your Workbook

Need to allow others to contribute to your Excel workbook? It's easy to do if you just share it. This tip provides an ...

Discover More

Inserting Special Spaces

Do you need to frequently add en spaces and em spaces to your documents? You can add special tools to Word that make ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Word Count is Zero

If you use the Word Count tool and are surprised that it returns a count of 0, it could be because of what you selected ...

Discover More

Creating a List of Cross-References

Cross-referencing has long been a capability in Word documents. You can easily add and remove cross-references but ...

Discover More

Tools to Boost Motivation and Productivity

Sometimes a writer needs motivation to keep ploughing ahead in their craft. Word doesn't really include any tools to help ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is five more than 0?

2022-11-08 21:44:22

sunny wong

Thanks for this which I find very useful to shorten labels

A Example
Excel formula names long enough to be intuitive to co-workers yet short enough to fit within one Windows Width (without scrolling to view the whole formula name)

It will also speed up my daily task if my custom Acronym List can be used same as Dictionary where a typed word automattically converts to Acronym; this will co-workers, including me, to memorize my Acronyms.
For now, I am adding my Acronym to custom Dictionary but find its maintance so labourious I don't always have the time.

A shortcut key to convert Acronym to its meaning will also be very helpful.

I appreciate other alternatives.


2022-11-07 10:58:18

Gaël

Hi Allen! Thanks for sharing this technique to automatically create a list of acronyms.

For people who want to save even more time or who might not be comfortable using macros, here's a free online tool that does the same pretty much instantaneously: https://listofacronyms.com

It will also attempt to fill the list of acronyms with each acronym's definition provided it was written down before the first use of the acronym (as this is a more common way of introducing acronyms as other people have pointed out below).

E.g. A central processing unit (CPU) is...

It's already helpful as is but feel free to reach out if you think it could be improved!


2019-03-22 09:51:30

Malcolm Patterson

Another option is to use PerfectIt, which includes a tool that builds an alphabetized list of abbreviations (with their definitions). It identifies abbreviations that have not been defined. It can also check to see that an abbreviation is not used before it is defined, and used instead of the spelled-out term thereafter. Anyone who processes large documents, especially those with many contributors, should evaluate this add-in for Word.

I note that many have commented that the normal method of defining an abbreviation is to spell out the term and to follow it with the abbreviation, enclosed by parentheses. This is generally but not universally true in the United States. For example, the AP Stylebook says to spell out the name of well-known organization at first use (with no definition of its abbreviation) and use the abbreviation thereafter. Other English-speaking peoples have adopted different conventions.

I echo the request for accumulating counts of the number of times each abbreviation appears.

There are actually some terms that should be abbreviated even if they occur only once in a document, e.g., abbreviations that are more readily recognized than the spelled-out term. (This requires an assessment of the intended audience.)


2019-03-04 11:02:35

Susan

I've used these macros to extract abbreviations but the real bane of my life are all the authors who define an abbreviation and then never actually use it. This is particularly true of those in the US, and often many don't provide any definition at all. It is a major problem as many authors seem to abbreviate everything in sight just for the sake of it. Drives me nuts! And of course it's a real drag to have to find each and every one. to see how many there are.
I've tried coding it myself but it's been beyond me so far.
I would basically want any abbreviations that are used three or more times to stay and the rest to be in full only. Could you please tell me how to add a count and command to the code to highlight those NOT used three or more times?


2018-08-21 23:50:11

Ken Endacott

ACRONYM LIST WHEN THE DEFINITION PRECEDES THE ACRONYM

The following macro creates a list of acronyms and their definitions where the definition precedes the acronym, for example “United States of America (USA)”. It assumes that the acronym is surrounded by brackets and the definition words are capitalised except for minor words. If the macro cannot match the first character of the acronym with a preceding word then it will give as the definition all preceding words back to the start of the paragraph.

Sub AcronymsAndDefinitions()
Dim aLength As Long
Dim firstChar As String
Dim acronym As String
Dim aDescr As String
Dim strOutput As String
Dim newDoc As Document
Application.ScreenUpdating = False
Selection.HomeKey unit:=wdStory
ActiveWindow.View.ShowHiddenText = False
strOutput = ""
Selection.Find.ClearFormatting
With Selection.Find
.ClearFormatting
.Text = "\([A-Z]@[A-Z]\)"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = True
.MatchWildcards = True
.MatchWholeWord = True
End With

Do
Selection.Find.Execute
If Selection.Find.Found Then
aLength = Len(Selection.Text) - 2
acronym = Mid(Selection.Text, 2, aLength)
firstChar = Left(acronym, 1)
Selection.MoveStart unit:=wdWord, Count:=-aLength

Do While Left(Selection.Text, 1) <> firstChar _
And Left(Selection.Text, 1) <> Chr(13) _
And Left(Selection.Text, 1) <> ActiveDocument.Characters(1)
Selection.MoveStart unit:=wdWord, Count:=-1
Loop
aDescr = Left(Selection.Text, Len(Selection.Text) - aLength - 2)
If Left(aDescr, 1) = Chr(13) Then aDescr = Mid(aDescr, 2)
strOutput = strOutput & acronym & vbTab & aDescr & vbCrLf
End If
Selection.Start = Selection.End
Loop Until Not Selection.Find.Found
Selection.HomeKey unit:=wdStory

If Len(strOutput) = 0 Then
MsgBox "No acronyms were found"
Else
Set newDoc = Documents.Add
Selection.TypeText Text:=Left(strOutput, Len(strOutput) - 1)
newDoc.Content.Sort SortOrder:=wdSortOrderAscending
Selection.HomeKey unit:=wdStory
End If
Application.ScreenUpdating = True
End Sub


2018-08-20 12:13:20

Mark Biegert

Hi folks,

The Table of Authorities method worked well for Word 2010, but not so well with the Word in Office 365 because the page number cannot be moved off the page (the key trick in Shauna Kelly's excellent post). In Word 2010, you could position a tab stop off the page and just have the number moved where it would not print. I tried the same thing in my new Word release and the page number wraps back onto the printed area of the page. Any suggestion on how to make the Table of Authorities work with the new Word releases?

Thanks


2018-05-21 09:05:34

Malcolm Patterson

Only those abbreviations that form a word are correctly called acronyms. Most acronyms are initialisms, a much larger subset of abbreviations. Abbreviations take other forms (e.g., contractions and customary abbreviations ending with a period), so a clarifying statement is usually needed to explain when the abbreviations to which you refer are just initialisms and acronyms.

Since WordTips are widely regarded as authoritative, misusing the word on this site does more damage than the many bad examples readers may encounter elsewhere. Please amend the article.


2017-10-26 08:00:23

csk

how can I change the second (long) code if I have the following structure for abbreviation:

......University of Oxford (OXF) is an old style university......

thanks very much


2016-10-04 13:04:55

Pam

PLEASE PLEASE post another version of the macro to work on documents where the definitions are before the acronym, such as, Austin Independent School District (AISD.

Thanks


2016-05-12 14:05:43

Bernadette Kiser

For all asking about definition before the acronym. Turn on your "paragraph marks" and you will see the hidden text code. Once you have the code, you can put whatever you want inside it.

Our acronyms are identified in text as: Austin Independent School District (AISD). The resulting code when you mark it is { XE "Austin Independent School District (AISD)" } (with the whole thing having a dotted line beneath and surrounding the {}). Once you can see the code, simply edit the text inside the quotes to fit your standard. Since I want the list to display the acronym first, my text will change to { XE "AISD Austin Independent School District" }. I want to be able to put a tab in between the acronym and the definition, so I will most likely include an asterisk between them so I can find and replace it with a tab character after I run the Insert command.


2016-04-06 14:52:02

John Kinsella

Can you please post an edit that looks for definitions BEFORE the acronym? That's how most documents use acronyms the first time.


2014-08-29 09:32:42

Lisa

I agree with Alan. I would love to see how this can be done when the acronyms follow the format Term (Acronym). I am going to be editing a document that totals over 3000 pages broken into 7 volumes, with a master acronym list used in all of the volumes. My main concern is making sure that an acronym is defined on its first use in a volume and only on its first use.


2014-04-01 19:46:34

Alan Edwards

Regrettably, this macro is backwards for most common acronym use in documents. Proper publishing rules of syntax require the first use definition of the acronym FOLLOWED by the acronym itself in parenthesis [e.g., "Reserve Officer Training Core (ROTC)" ]. This macro has reversed the tabulation as noted in the explanation immediately preceding the macro coding.


2013-11-14 09:49:40

Silvia Paddock

Hi,

for Mac users (OSX 10.7 and higher), we just released a new tool on the Mac App Store (look for "acronym" on the App Store or click link below). It's called "MAX - My Acronym eXtractor."

It finds acronyms in texts (e.g., Word format), creates a list, sorts the list alphabetically, finds the most likely definition (by looking in front of the acronym), checks if the acronym is called out in the right place, and exports the table in several formats.

https://itunes.apple.com/us/app/max-my-acronym-extractor/id658390220?ls=1&mt=12

We have been using this tool internally for quite a while and run it on every document. Saves a lot of dull work...

Hope you find this helpful. Thanks!

Silvia


2012-04-13 11:46:19

j

Thank you for sharing!


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.