Hi there,
we have a problem when loading and saving a DOCX file with heading styles in it. I have attached a sample (in the zip). The content is german, sorry.
When this docx is opened with MS Word, everything is fine, see attached screenshot Before.png. Please see the german heading styles "Überschrift 1" (=Heading 1), "Überschrift 2" (=Heading 2), and so on.
Now I load this docx file into Spire.Doc and save it again as a docx with Spire.Doc (no processing between at all):
WordDocument.LoadFromFile( Filename, FileFormat.Docx );
WordDocument.SaveToFile( Filename, FileFormat.Docx );
When I open the docx in MS Word again, all the heading styles have changed. The former styles have added "1" in their names (e.g. "Überschrift 1" is now "Überschrift 11") and there are new Heading styles now (with 1, 2, 3, etc.). Please see attached screenshot After.png.
You should be able to reproduce this with the attached sample docx file.
Why that? How to work around this? The styles shall not be modified at all when just loading and saving a docx file. Is this a bug or a feature?
Thanks and regards
Felix