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

Free Support Forum - aspose.com

Is Document.Cleanup obsolete?

Hello the API docs say theres a document.cleanup() method i can call to remove unused styles and lists.

When i call this method i get the following error:

‘Document’ does not contain a definition for ‘Cleanup’ and no extension method ‘Cleanup’ accepting a first argument of type ‘Document’ could be found (are you missing a using directive or an assembly reference?)

Why does the cleanup method refer to the Aspose.Words assembly and not the Aspose.Words.Document assembly?

the method is attached to the Document object.


Thanks for your inquriy. Please note we have introduced the Cleanup methods in Aspose.Words for .NET 17.7. Please download and try latest version of Aspose.Words for .NET, it will help you to accomplish the task. However, if still issue persists then please share your sample code here, we will look into it and will guide you accordingly.

Best Regards,