Border set to none when getting borders

Hi,

I’ve run into an issue where when you get borders(f.e ParagraphFormat.Borders.Bottom) that have not been set to anything yet they are set to None. This can result in borders from document styles being overridden by Direct Formatting border:none simply by getting the border property, which is quite unexpected. This can be seen in this example:

BorderNoneOnGetBorder.zip (65.7 KB)

If the line that gets the border is commented out the direct formatting with border:none disappears and the document looks as expected. Also when we unzip the “TestBeforeMerge.docx” file we can see that the border:none on border bottom is already set by the getter, but the information about it is not displayed just yet in MS Word.

Could you please take a look?

Thank you,
Bartosz

@acturisaspose
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25489

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The border becomes explicitly set to None after an intermediate save operation. You can avoid this operation as a workaround.

The issues you have found earlier (filed as WORDSNET-25489) have been fixed in this Aspose.Words for .NET 23.10 update also available on NuGet.