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

Free Support Forum - aspose.com

Can we disable Macros in .docm/.doc instead of stripping or removing it in java using aspose?

Is there anyway i can pass a .doc through my code/workflow by disabling macro(not executing it) ? i know i can remove macros from the document, but i want to just disable it or skip executing it.

@1623751199347 Aspose.Words does not execute macros in your document upon opening it. You can modify your macros using VbaProject. For example you can wrap whole macros into multiline comment to make is non-executable.

Am also performing diff actions in the doc, like modifying the doc, adding extra paras, adding comments, converting into input streams etc etc, so do u meant to say no mater what i do macros will not get executed ?
doesnt modifying macros affect the document? or will it preserve the macros and the original document ?

@1623751199347 Yes, your understanding is right. Whatever you do with document using Aspose.Words macros will not be executed by Aspose.Words. Aspose.Words does not have an ability to execute macros.
Modifying macros will affect only macros, but not the document content.

1 Like