I currently have an X7 document with almost a 100 pages, each with a different sponsor logo on it and each page has been renamed to the corresponding sponsor. Does anyone know if there is a macro available to alphabetize the pages in the document by page name?
So, I decided to make my own. With a little help from Shelby on the sorting (Thanks Shelby), here are the final results...
Sub AlphabetizePages() Dim x As Integer, j As Integer
With ActiveDocument.Pages For x = 1 To .Count - 1 For j = x + 1 To .Count If UCase(.Item(x).Name) > UCase(.Item(j).Name) Then .Item(x).MoveTo j .Item(j - 1).MoveTo x End If Next j Next x End WithEnd Sub
This works with Letters and numbers in the page name.