Free Support Forum - aspose.com

Word -> PDF conversion and macros

We are using Aspose Words (for Java) to convert Word documents to PDF. The source of these Word documents is in general unknown, so these Word documents may contain malicious macros.

I was wondering what the impact of malicious macros in Word documents can be on the PDF conversion.

  • How does the Word -> PDF converter deal with macros? Do macros get executed during conversion?
  • Are there any risks involved when converting Word documents with macros to PDF?
  • Can macro’s be disabled before converting?

Any information on how the PDF converter deals with macros is very welcome…

@helmersg,

Thanks for your inquiry. Aspose.Words does nothing with macros while document to PDF conversion. Moreover, Aspose.Words does not deal with Macros in document. However, the macros are preserved upon open and save Word document with Aspose.Words. Also, there is no way to run macros at the moment using Aspose.Words.

You can use Document.RemoveMacros method to remove all macros from the document.

Thanks for the explanation!