Sorting html code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a word doc that looks like this:

<a href="
">The Notorious B.I.G. - Big
Poppa</a><br>
<a href="
">The Shins - Girl on the
Wing</a><br>
<a href="
">Journey - Separate Ways
(Worlds Apart)</a><br>


I need to alphabetically sort the names of the songs, which are in between
the html tags, and keep them with their respective html code, so that when I
put them I put the code up on a web page the songs will be listed
alphabetically.

Is there any way this can be done?

I know if there is anyone who can do it you guy's can.

Thanks for looking at this.
 
If they are all in that fomat, select the list, replace the > character with
Sort on Field 3
Remove the tab characters ie

With Selection
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ">"
.Replacement.Text = ">^9"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
.Sort ExcludeHeader:=False, FieldNumber:="Field 3", SortFieldType _
:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending
With .Find
.Text = "^9"
.Replacement.Text = ""
.Execute Replace:=wdReplaceAll
End With
End With

This will all fall down if some of the entries are different.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top