macro help .. how to sort according to numbering of pages of document ?

i have 20 page document

all pages name is in form of numbers like1,20,7,8,4,5,6,10,15,18,13,2,9,3,11,14,12,16,17,19 etc.

now i want to sort all pages in proper sequence of numbering like 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 etc.