How remove macros?

Hi,

We have recently bougth your fabulous API Aspose Words for Java (order 130606075036)

My question is : can we remove (with aspose) all macros on a Word template after a merge mail ?

Regards,
Julien

Hi Julien,

Thanks for your inquiry. Yes, you can remove macros from your document by using Document.removeMacros method. This method remove all macros (the VBA project) as well as toolbars and command customizations from the document.

Document doc = new Document(MyDir + "in.docx");
if (doc.hasMacros())
    doc.removeMacros();

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.