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

Free Support Forum - aspose.com

Add macro programmatically to pptx/pptm


From the online feature list I can’t make out if this can be done.
Alternatively, is there a way to convert pptm to pptx while maitaining macro’s “hidden” and deactivated so that they can be re-enabled after conversion back to pptm?

Use case is massive translation of pptm docs, where translation software won’t work with pptm format, so conversion to pptx is required. The translated output pptx needs to be converted back to pptm, and a macro that adjusts font sizes to make text fit in predesigned text boxes, needs to be reenabled, so that final output to PDF renders correctly.

Thanks for any pointers.


I have observed your requirements and like to share that Aspose.Slides allows you to add the macros inside the presentation. I request you to please visit this documentation link to serve the purpose on your end. As far as your requirement of converting PPTX too PPTX is concerned, I like to add here that you can load the PPTX and save that as PPTX. The following sample code will serve the purpose to you in this regard.

Presentation pres=new Presentation(“test.pptm”);

I hope the shared information will be helpful. Please share, if I may help you further in this regard.

Many Thanks,