Keep VBA macro

I'm trying to use Aspose slides for java
to process a powerpoint presentation which
contains a VBA macro. After processing with
Aspose I need the macro to remain in the presentation,
but it always disappears.


I'm using version 2.2.0-20100328 of the slides
library, and have attached the blank presentation
which encapsulates the macro.

Hi Peter,

Thanks for your interest in Aspose.Slides.

I have worked on your's specified issue. First of all, I converted the PPTM file to PPT using MS PowerPoint and then read the presentation using Aspose.Slides for Java 2.2.0. I was successfully able to add the new slide and then saved that PPT file successfully while retaining the template as well. For reference, i have attached the source and output PPT files as well.

Please share with us, if the problem still persists.

Thanks and Regards,

I am having this issue as well...

Running the following against a presentation that has a macro in it always prints "macro not present."

The saved presentation has no macro in it, despite the template containing one.

The exception leading to the catch block is not being thrown.

Presentation presentation;

try{

presentation = new Presentation(SystemInfo.getTemplateFileDir() + "\\Template.ppt");

}

catch(Exception e){

logger.error(e.getMessage(), e);

presentation = new Presentation();

}

if(presentation.hasVBAMacros()){

System.out.println("presentation has macros");

}

else{

System.out.println("macros not present");

}

presentation.write(SystemInfo.getTemplateFileDir() + "\\TemplateTest.ppt");

Hi Peter,

I have utilized the code snippet provided by you and am successfully able to generate the output presentation containing the same macro as in source presentation. For your reference, i have attached the source and output presentations, along with program output.

Can you please verify JDK version on your end ? I am using JDK 1.6 with Aspose.Slides for Java 2.2.0. Please feel free to share, if the problem still persists.

Thanks and Regards,

Running against...

aspose.slides - version 2.2.0-20100328

jvm - BEA jrockit - version 1.5

hi Mudassir...
which Aspose objects are you using?
ppt or pptx?

thank you!

Dear Peter,

Please remember, I am using PPT files and in order to open such files PPT object is used. I have made no changes in your code and have used that. I think in your code, its PPT object, that has been used to open PPT file.

I suggest you please try JDK 1.6 and also download latest version of Aspose.Metafiles available here, just in case if it is needed.

Thanks and Regards,