Preserve Latent Style Information during Saving Word DOCX Document (C# .NET)

I have found an issue when saving a document using Aspose.Words where it loses LatentStyle information for 4 styles from documents created in the following version of Word.

Microsoft 365 Apps for business
Microsoft® Word for Microsoft 365 MSO (16.0.14026.20270) 64-bit

Replication Steps

  • Create a new Blank Document (File > New > Blank Document)

  • Save the Document (File > Save > Browse > C:\Temp\Blank.docx)

  • Run the following code

    var document = new Document(@"C:\Temp\Blank.docx");
    document.Save(@"C:\Temp\Aspose.docx");
    
  • The LatentStyle info for the following 4 Styles will be missing

    • Mention
    • Smart Hyperlink
    • Hashtag
    • Unresolved Mention

LatentStyle OpenXml in Blank.docx
image.png (3.2 KB)

LatentStyle OpenXml in Aspose.docx
image.png (2.5 KB)

This means that whenever saving with Aspose the styles reappear in the Style Pane
image.png (1.5 KB)
image.png (3.18 KB)
image.png (2.47 KB)
image.png (1.47 KB)

@James_Winn,

We have logged this problem in our issue tracking system with ID WORDSNET-22367. We will further look into the details of this problem and will keep you updated on the status of linked issue. We apologize for your inconvenience.

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