View Single Post
 
Old 11-18-2015, 04:35 AM
omar omar is offline Windows 7 64bit Office 2003
Novice
 
Join Date: Nov 2015
Posts: 5
omar is on a distinguished road
Default

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 View Post
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)
Reply With Quote