DocumentRemoveMacros Method
Removes all macros (the VBA project) as well as toolbars and command customizations from the document.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public void RemoveMacros()
Remarks

By removing all macros from a document you can ensure the document contains no macro viruses.

Examples
Shows how to remove all macros from a document.
[C#]

Document doc = new Document(MyDir + "Document.doc");
doc.RemoveMacros();
See Also