I just recorded the basics, removed a lot of the excess, and added the
deduplication loop, and this is what I got. It is not pretty code but I
think it will do what you want if your document is simply a list and nothing
else; it may need some tweaking if you have, say, redundant spaces. Anyway,
here it is: please try it on a *copy* of your document.
Sub Macro1()
Selection.WholeStory
WordBasic.TextToTable
Selection.InsertColumns
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:=
_
ListGalleries(wdNumberGallery).ListTemplates(1)
ActiveDocument.ConvertNumbersToText
With ActiveDocument.Tables(1)
.Sort ExcludeHeader:=False, FieldNumber:="Column 2", _
SortFieldType:=wdSortFieldAlphanumeric
For Each ro In .Rows
Do
If ro.Index = ro.Parent.Rows.Last.Index Then Exit For
If ro.Cells(2).Range = ro.Next.Cells(2).Range Then
ro.Next.Delete
Else
Exit Do
End If
Loop
Next
.Sort ExcludeHeader:=False, FieldNumber:="Column 1", _
SortFieldType:=wdSortFieldAlphanumeric
.Columns(1).Delete
.Rows.ConvertToText Separator:=wdSeparateByParagraphs
End With
End Sub
If you don't know what to do with this, see
http://www.gmayor.com/installing_macro.htm