System.InvalidOperationException: Cannot find a style with this istd when running Cleanup function

On opening a Document and performing some deletions of styles, then calling the Cleanup function on the document, we will receive this exception: System.InvalidOperationException: Cannot find a style with this istd

The Web App reproducing this issue:
WebAppAspose.zip (55.8 KB)

Hi @kaushlendu.choudhary,
I appreciate your interest in Aspose products.

I just executed your code and works fine without throwing any errors. The only change I made was how to load the license. I used the word license class, instead of the the one from Cells.

Aspose.Words.License lic = new Aspose.Words.License();

What version are you running? I am using the latest one, “23.1.0.0”.

Please let me know if you would like to know something else.
Best regards.

Hello, I am using Aspose 21.10.0. Thank you for pointing out that it works with the current version.

I have also tested with Aspose.Words 23.1.0 and it is working on my side as well.

1 Like