See attached sample which uses “DocumentBuilder.InsertStyleSeparator”:
StyleSeparator.zip (4.9 MB)
The first code snippet is based on https://reference.aspose.com/net/words/aspose.words/documentbuilder/methods/insertstyleseparator and works fine.
The second snippet loads a word document file where the two styles are already defined. Here, the full text line has the same style, and the style separator is placed at the end of the line - not at the position where I created it.
Do you have an idea what went wrong? Is there something special to keep in mind when defining the styles in the word template?
Best regards
Wolfgang