Kai,
What I mean is that the script is too limited.
The idea would be to treat any group of paragraphs predefined by "Style 0" style as follows: Style 1 for the first para, Style 2 for the following paras, Style 3 for the last para.
In my sample, the script does not work and stop on the code line 142.