DocumentCleanup Method (CleanupOptions)
Cleans unused styles and lists from the document depending on given CleanupOptions.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public void Cleanup(
	CleanupOptions options
)

Parameters

options
Type: Aspose.WordsCleanupOptions
Examples
Shows how to remove all unused styles and lists from a document.
[C#]

Document doc = new Document(MyDir + "Document.doc");

CleanupOptions cleanupOptions = new CleanupOptions
{
    UnusedLists = true,
    UnusedStyles = true
};

doc.Cleanup(cleanupOptions);
See Also