Microsoft Word scripts


I have a question regarding scripts in Word and PDF transformation using Aspose.

If I have a word document that contains scripts and I transform this word document to PDF using Aspose (Java), what happens with the Word scripts? Is there any risk that they will be executed? My fear is that it’s possible to add some bad scripts that can harm my system during the pdf transformation.



Thanks for your inquiry. Aspose.Words does nothing with macros while rendering document to PDF. Moreover, Aspose.Words does not execute the macros.

You can use Document.RemoveMacros method to remove all macros (the VBA project) from the document. You can use Document.HasMacros property to check if document has macros. This property returns true if the document has a VBA project (macros).