Following the presentation of @Roland_Lannuzel, I set up the creation of a table of contents.
Having documents of more than 500 pages, analyzing the style of each line killed me: more than 15 minutes on an i7 2.2Ghz/32Go!
I changed a little bit the code by putting a bookmark each time I assigned a style. As a result, I just have 525 bookmarks to analyze against 41050 lines.
But, the next code line kills a lot of nerves since it takes a significant amount of time.
$o:= WP Get position ($paragraph;wk 4D Write Pro layout)
Is there anything that can be done to improve the speed or is it just this command that’s screwed up?