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: 20.1
Syntax
public void Cleanup(
	CleanupOptions options
)

Parameters

options
Type: Aspose.WordsCleanupOptions
Examples
Shows how to remove all unused styles and lists from a document.
Document doc = new Document(MyDir + "Document.doc");

CleanupOptions cleanupOptions = new CleanupOptions { UnusedLists = true, UnusedStyles = true };
doc.Cleanup(cleanupOptions);
See Also