We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Heading numbering isn't copied after styles copying

Hi Aspose team,
In .NET, I have trouble with heading numbering after copied styles from document to document.
I attached source and destination documents into this topic (there’re some styles in Germain)
HeadingNumbering.zip (69.1 KB)

In source document, there’re styles “Kreuzlingen Überschrift 2” and “Kreuzlingen Überschrift 3” with numbering _ see image below
image.png (10.7 KB)

In destination document, they’re without numbering
image.png (6.0 KB)

I copy styles from source to destination by this function

    public static void ApplyStyles(this Document destination, Document source)
        foreach (Style style in source.Styles)
            var styleName = style.Name;
            var targetStyle = destination.Styles.AddCopy(style);
            targetStyle.Name = styleName;

But in the result, the styles “Kreuzlingen Überschrift 2” and “Kreuzlingen Überschrift 3” are without numbering
image.png (9.3 KB)

I also tried the solution in this topic : Headings Numbering after splitting documents is starting by 1.
But the heading numbering isn’t copied to destination document.

Do you have any clue for my problem ?
Thank in advance
Best regards


Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16762. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like

The issues you have found earlier (filed as WORDSNET-16762) have been fixed in this Aspose.Words for .NET 18.11 update and this Aspose.Words for Java 18.11 update.