You made my day Paul, people like you make computer idiots like me live easier. I will try your new Macro and will feedback to you, you have solved 95% of my problems. Thank you very much. omar
Quote:
Originally Posted by macropod
The sort is based on the number of characters on each line. If you change to a fixed-width font you'll see that. Note that some lines also have the same number of characters. If you want to sort on the basis of the string widths on each line, change:
Code:
.Cell(i, 2).Range.Text = Len(.Cell(i, 1).Range.Text)
to:
Code:
.Cell(i, 2).Range.Text = .Cell(i, 1).Range.Characters.Last.Previous.Information(wdHorizontalPositionRelativeToPage)
|