We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

JSP usage

I have a jsp program saving a doc file (upload from HTML input type=file). I want to remove macros, using Aspose, before saving to disk. Can this be performed and how?
File is saved by:

file = new FileOutputStream(...)
file.write(...)
file.write(...)
...
file.close()

This message was posted using Page2Forum from Feature Overview - Aspose.Words for .NET and Java

Hi
Thanks for your request. Yes you can remove macros from the document using Aspose.Words. Please see the following link for more information.
https://reference.aspose.com/words/java/com.aspose.words/document/#removeMacros--
The code will looks like the following:

// Open document (you can also open document from inputStream)
Document doc = new Document("C:\\Temp\\in.doc");
// Remove macros
doc.removeMacros();
// Save document
doc.save("C:\\Temp\\out.doc");

Hope this helps.
Best regards.