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.9
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
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
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