gloub
01-01-2020, 02:20 AM
To manage my todo-list on Word, I sometimes sort by alphabetical order a previously selected part of it (see below).
Unfortunately, since I often use a red dot at the beginning of the line to draw attention to certain tasks, it disturbs the sorting.
I would like to find a way to make the sorting process ignore the presence of a dot at the beginning of the line.
So far, all I could think of (because my VBA is very poor) is:
- cut "manually" each point, then paste it at the end of the line
(I say lines but they are actually paragraphs, separated by line breaks)
- select the text to be sorted and then sort it.
- cut "manually" each point, then paste it at the beginning of the line
But obviously this is a slow process when it involves dozens of lines.
So I'm looking for a way to do it with a macro, but it's beyond my capabilities in VBA, which are very limited.
Can someone please help me?
Thanks...and Happy New Year!
TODO-LIST BEFORE SORTING
MDP : task n°1
●EVC : task n°2
MDP : task n°4
APV : task n°6
●BAF : task n°2
EVC : task n°1
BAF : task n°1
●BEG : task n°3
APV : task n°1
BEG : task n°2
TODO-LIST AFTER SORTING
APV : task n°1
APV : task n°6
BAF : task n°1
●BAF : task n°2
BEG : task n°2
●BEG : task n°3
EVC : task n°1
●EVC : task n°2
MDP : task n°1
MDP : task n°4
Paragraphs have been sorted regardless to the presence of a red dot.
Unfortunately, since I often use a red dot at the beginning of the line to draw attention to certain tasks, it disturbs the sorting.
I would like to find a way to make the sorting process ignore the presence of a dot at the beginning of the line.
So far, all I could think of (because my VBA is very poor) is:
- cut "manually" each point, then paste it at the end of the line
(I say lines but they are actually paragraphs, separated by line breaks)
- select the text to be sorted and then sort it.
- cut "manually" each point, then paste it at the beginning of the line
But obviously this is a slow process when it involves dozens of lines.
So I'm looking for a way to do it with a macro, but it's beyond my capabilities in VBA, which are very limited.
Can someone please help me?
Thanks...and Happy New Year!
TODO-LIST BEFORE SORTING
MDP : task n°1
●EVC : task n°2
MDP : task n°4
APV : task n°6
●BAF : task n°2
EVC : task n°1
BAF : task n°1
●BEG : task n°3
APV : task n°1
BEG : task n°2
TODO-LIST AFTER SORTING
APV : task n°1
APV : task n°6
BAF : task n°1
●BAF : task n°2
BEG : task n°2
●BEG : task n°3
EVC : task n°1
●EVC : task n°2
MDP : task n°1
MDP : task n°4
Paragraphs have been sorted regardless to the presence of a red dot.