The ConvertNumbersToText
method isn't valid for Selection
, but does work for the List
class, so this sub will convert each List in the ActiveDocument
:
Sub Auto_Format_convert_list_numbers()
Set RE = CreateObject("vbscript.regexp")
'Change your pattern here
RE.Pattern = "[A-Z][A-z][0-9][0-9][-][0-9]"
For Each Lst In ActiveDocument.Lists
Set Match = RE.Execute(Lst.Range.Text)
If Match.Count Then
Lst.ConvertNumbersToText
End If
Next
End Sub