CleanupOptions Class
Allows to specify options for document cleaning.
Inheritance Hierarchy
SystemObject
  Aspose.WordsCleanupOptions

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
Syntax
public class CleanupOptions

The CleanupOptions type exposes the following members.

Constructors
  NameDescription
Public methodCleanupOptions
Initializes a new instance of the CleanupOptions class
Properties
  NameDescription
Public propertyCode exampleUnusedLists
Specifies whether unused list and list definitions should be removed from document. Default value is true.
Public propertyCode exampleUnusedStyles
Specifies whether unused styles should be removed from document. Default value is true.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
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