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

Free Support Forum - aspose.com

Appending PPT slides to PPTX slides generates error

Hi,

I try to add the slides form a ppt file (ppt.ppt) to a pptx file (pptx.pptx) and the application throws ArgumentNullException.
The code to reproduce the issue is:

var presentationEx = new PresentationEx(“C:\PPTX.pptx”);
var presentation = new PresentationEx(“C:\PPT.ppt”);
foreach (SlideEx slide in presentation.Slides)
{
presentationEx.Slides.AddClone(slide);
}
presentationEx.Save(“C:\PPTX11.pptx”, Aspose.Slides.Export.SaveFormat.Pptx);

Regards,
Lucian Nistor
Senior Software Developer
IBM Romania

Hi Lucian Nistor,


Thanks for inquiring Aspose.Slides.

I have worked with the presentaiton file shared and have been able to observe the issue specified. An issue with ID SLIDESNET-34516 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

Hello,

Do you have any news regarding this quite old issue ?

Thank you,
Mihai Andrei
Sr Software Engineer
IBM Romania


Hi Mihai Andrei,


I have verified the attached presentations using Aspose.Slides for .NET 14.2.0 on my end and have found issue resolved. Please try using the attached version on your end to serve the purpose. I also like to share further that Aspose.Slides for .NET 14.2.0 is new API that unified both PPT and PPTX namespaces in single API. The code base is little changed in new API and you can please refer to online documentation for further reference in this regard.

public static void clonePPT_PPTX()
{
String path = @“c:\Presentations”;
var presentationEx = new Presentation(path + “PPTX.pptx”);
var presentation = new Presentation(path + “PPT.ppt”);
foreach (Slide slide in presentation.Slides)
{
presentationEx.Slides.AddClone(slide);
}
presentationEx.Save(path + “PPTX11.pptx”, Aspose.Slides.Export.SaveFormat.Pptx);
}

Many Thanks,

Hello,

We’ve tested against Aspose.Slides 14.4.0.0 and it seems the issue is fixed.

Thank you,
Mihai Andrei

Hi Mihai Andrei,

That is appreciable that things have worked for you in new version. Please share, if I may help you further in this regard.

Many Thanks,