Sort your bibliography in Word in seconds easily

Опубликовано: 15 Март 2026
на канале: WinOffice
2,793
4

Sort your bibliography alphabetically in Word in seconds and easily || Sort alphabetically the reference list in a Word Document

In a document such as a thesis, or any other document that includes references, the reference list or bibliography at the end of the document, usually needs to be in alphabetical order.

If you have a few sources, this is a rather simple process. A reference manager can also create a reference list in alphabetical order for you. But in this video I would like to show you how you can sort your reference list alphabetically in just a few seconds regardless of how many references you may have. Sorting a long list of references manually can be a tedious and time-consuming process, but using some VBA it can be accomplished in a matter of seconds.

But don’t worry if you are not familiar with VBA, you won’t have to type a single line of code. I will provide you with all the necessary code, that you can find in the description, and guide you through every step. You may only have to type a couple of words and it won’t take more than just a few minutes. After that, you will be able to sort any reference list alphabetically in seconds!

So, let’s get started. First of all, you need to apply headings to your paper’s chapters and sections and a first level heading to your references section. Now go to the Developer tab. If you don’t see the developer tab on the ribbon, you must make it visible first. From File, Go to Options, then select Customize Ribbon and from the Main Tabs menu on the right, make sure that the Developer Tab is checked.

From the Developer tab click on Visual Basic. From the new screen select Modules, right-click and select New Module. Now simply copy and paste the code shown here that you will also find in the video’s description. Notice the text property on the 6th line. The text should match the title you selected for the reference section, be it bibliography, bibliographic references, reference list, or whatever. Now simply click on the green play button from the toolbar, or from the menu select Run and then Run Sub/User Form.

You are now able to sort alphabetically any reference list, regardless of how long it is, in seconds with minimal effort.

If you have any problems or questions let me know!

VBA Code:
Sub SortBibliography()
Application.ScreenUpdating = False
Dim Rng As Range
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "References"
.Style = "Heading 1"
.Format = True
.Forward = True
.MatchCase = True
.Wrap = wdFindStop
.MatchWildcards = False
.Execute
End With
If .Find.Found = True Then
Set Rng = .Duplicate.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel")
Rng.Start = Rng.Paragraphs.First.Range.End
Rng.Sort SortOrder:=wdSortOrderAscending
End If
End With
Application.ScreenUpdating = True
End Sub