Making Numbered lists in Microsoft Word is pretty easy and anyone with primary knowledge about Word would make one even without trying; like when you type “1.” followed by space, Word would automatically start a numbered list for you. But when it comes to making a reverse numbered list or a top 10 list with a count down style, Word provides no ability of making such lists out of the box.
So how could we make one? Microsoft Word provides a feature for developers to create Macros in Visual Basic programming language which we can use to manipulate data easily and in an automated way. Now, you don’t need to know about coding to make the reverse list, I will provide you with step-by-step instructions on what to do to create the Marco and then be able to use it from now and on to create Reverse Numbered Lists. (the Macro code credit goes to Word Tips website)
The code used can work with Microsoft Word 97, 2000, 2002, 2003, 2007, and 2010 (by the time of this writing). The interface instructions to create these Macros differ between Word versions. I’ll provide you with instructions on how to do it with Word 2010.
Showing the Developer tab,
If the “Developer” tab in Word is not visible, do the following to show it up:
- From the menu, click “File” then select “Options”
- Select “Customize Ribbon”
- On the right side under “Customize the Ribbon” section, check the “Developer” checkbox.
- Then click the “OK” button.
Creating the Macro,
- Select the “Developer” tab
- Click the “Visual Basic” button.
- On the left, in the Project panel, click the plus sign next to “Normal” to expand
- Then click the plus sign next to “Modules”
- Double click “NewMacros”
- Copy and Paste the following code to the Code window in the Visual Basic editor. (put the mouse cursor at the end of the document before pasting to keep the previously created Macros)
Sub RevList() Dim ShowFlag As Boolean Dim Numparas As Integer Dim Counter As Integer Numparas = Selection.Paragraphs.Count Selection.MoveLeft Unit:=wdCharacter, Count:=1 ShowFlag = ActiveWindow.View.ShowFieldCodes ActiveWindow.View.ShowFieldCodes = True DoList Numparas Counter = 1 While Counter < Numparas Selection.Move Unit:=wdParagraph, Count:=1 DoList Numparas Counter = Counter + 1 Wend ActiveWindow.View.ShowFieldCodes = ShowFlag ActiveDocument.Select ActiveDocument.Fields.Update End Sub Private Sub DoList(Cnt As Integer) Selection.Extend Selection.MoveRight Unit:=wdCharacter, Count:=1 If InStr(Selection.Text, "SEQ") > 0 Then Selection.MoveRight Unit:=wdCharacter, Count:=2 Selection.Delete Unit:=wdCharacter, Count:=1 Else Selection.Collapse Direction:=wdCollapseStart End If Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ PreserveFormatting:=False Selection.TypeText Text:="=" & Cnt + 1 & "-" Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ PreserveFormatting:=False Selection.TypeText Text:="SEQ RevList" With Selection.ParagraphFormat .LeftIndent = InchesToPoints(0.5) .FirstLineIndent = InchesToPoints(-0.5) End With Selection.MoveRight Unit:=wdCharacter, Count:=4 Selection.InsertAfter "." & vbTab End Sub
- Click the “save” button. Once you do that a new Macro has been saved with name “RevList”
- Close the Visual Basic window.
Adding the Macro as a button in Word
- So back to Word, click “File” from the menu then select “Options”
- Select the “Customize Ribbon” tab
- In the “Choose commands From” section, select “Macros” from the drop down list.
- In the box below it, look for “Normal.NewMacros.RevList” and select it
- On the right side and under “Customize the Ribbon”, select “Main Tabs” from the drop down list
- Select the “Home” tab
- Click the “New Group” button
- While the new group tab is selected, click the “Rename” button
- Name this group whatever you like, if you like, name it “My Buttons”
- While the “My Buttons” is selected (and that RevList macro selected), click the “Add >>” button
- Now it will be automatically selected, so click the “Rename” button to rename Normal.NewMacros.RevList and give it the name you like, for example, “Reverse List”. Also it’s a good idea to assign it an icon, for example a down arrow icon.
- Now click the “Ok” button. Then click the Ok button again for the Word Options dialog to save the changes.
What happened now is that you will see a button for the “Reverse List” macro added under the Home tab at the far right group of it.
Using the Reverse List button,
Write down your list in Word as paragraphs (you press Enter after each list item). For example:
Microsoft Windows 7
Microsoft Windows Vista
Microsoft Windows XP
Select the list and then press the our “Reverse List” button, and here you go, will see that a reverse list has been created like this:
3. Microsoft Windows 7
2. Microsoft Windows Vista
1. Microsoft Windows XP
Now if you wanted to add a new item in the list, anywhere in it (each list item should be a paragraph), do so then select the entire list and click the “Reverse List” button again, it will automatically reassign the numbers in the list. for Example, we added Microsoft Windows 2000 to the list:
3. Microsoft Windows 7
2. Microsoft Windows Vista
1. Microsoft Windows XP
Microsoft Windows 2000
Select the entire list, and then click the button, it becomes:
4. Microsoft Windows 7
3. Microsoft Windows Vista
2. Microsoft Windows XP
1. Microsoft Windows 2000
Advanced instructions,
Now, you are set to go with that, but if you wanted to change the “hanging indent”, you have to edit the Macro code a bit. Change the lines in the DoList macro where you will see the LeftIndent and FirstLineIndent properties which you can set there.
Want to get updates for new posts? Subscribe to my RSS feed and follow me on twitter :)
You can also get the ITfall blog updates by Email.
And don't forget to share this post and leave a comment ;)
One Comment
I’d like to change the formatting of the number to [n] (rather than n.).
Changing the trailing dot to ] is easy, but I couldn’t figure out how to insert the leading [
Any help will be highly appreciated.