Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Auto Creation of an Acronym List.
Written by Allen Wyatt (last updated December 29, 2018)
This tip applies to Word 97, 2000, 2002, and 2003
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:
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:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (446) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Auto Creation of an Acronym List.
Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!
Mail merge can be used to put together groups of documents that rely on common information. This tip shows how mail merge ...
Discover MoreOne of the things that the Organizer is great at doing is managing styles. You can use it to move them between templates ...
Discover MoreDiscussions in a valuable tool for workplace collaboration on the same Word document.
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2022-11-07 06:36:48
Hi Allen! Thanks for sharing this techniques to automatically create a list of acronyms.
For people who want to save even more time or who might not be comfortable using macros, I created a free online tool that does the same pretty much instantaneously: https://listofacronyms.com
It even picks up the full terminology when the acronym has been defined in the document. Although, contrary to your macro it expects the first mention of the acronym to be the full definition immediately followed by the acronym in parentheses (and not the other way around).
It's already helpful as is but feel free to reach out if you think it could be improved!
2022-03-18 01:21:17
Rajesh
Hi
I am using wildcard in MS word to get all acronyms highlighted. I will apply a particular color to highlight all of them after searching in Main Document. I want the acronyms to be highlighted only on its FIRST OCCURRENCE in the entire article or at least in a different color for its first occurence and some other color for repeated occurrences. Is it possible? The purpose is simple that the acronym used at first instance should be expanded by me, if not done earlier.
Will be happy to get some quick tips on this.
Thanks in advance.
Rajesh
2021-05-25 16:33:42
This is great. Another option is the PerfectIT add-in. It's a consistency checker tool that has an acronym list generator feature.
2021-05-25 01:27:30
Lion
Shauna's page link doesn't work any more.
Here's the updated link: https://shaunakelly.com/word/layout/glossary.html
2020-02-11 10:23:32
JESSICA DAVIS
If you are willing to shell out a few bucks a year, there is an add-on called PerfectIT that does a nice job to building an acronyms table. It also checks to see if you've defined the acronyms before using them, along with a lot of other consistency checks.
2020-02-10 18:28:29
Jon Jensen
After running the ListAcronyms() macro the'Match Case' and 'Find whole words only' options end up being grayed out.
2020-02-04 05:50:37
Brendan Glynn
Hi Allen
Just a query on listing abbreviations vs their full explanation within a table of abbreviations.
Where a term, e.g., ALARA which in this case would mean 'As Low As Reasonably Achievable' is written would you write the explanation text as written, or would you only capitalize the first letter and have the remaining words in lower case, e.g., 'As low as reasonably achievable'?
Thanks in advance.
2019-01-09 11:47:45
Ken Blair
Allen,
You need to delete or change the link to Shauna Kelley's website. It generate a 404 error.
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments