Hi support,
I switch the Aspose.Slides libary from version 16.3 to 18.2.1.
Now I do get an error, if I try to merge 2 presentations.
Here is the example code:
string pptxFile = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, “SB1.pptx”);
string pptxResult = System.AppDomain.CurrentDomain.BaseDirectory;
//Open file
Aspose.Slides.LoadOptions lo = new Aspose.Slides.LoadOptions(Aspose.Slides.LoadFormat.Pptx);
Aspose.Slides.Presentation masterpptx = new Aspose.Slides.Presentation(pptxFile, lo);
//Delete slides
while (masterpptx.Slides.Count > 0)
masterpptx.Slides.RemoveAt(0);
Aspose.Slides.Presentation presToCopy = new Aspose.Slides.Presentation(pptxFile, lo);
//Copy slides
masterpptx.Slides.AddClone(presToCopy.Slides[0]); // Null reference error happens!!!
//Save new file
masterpptx.Save(pptxResult + "Result.pptx", Aspose.Slides.Export.SaveFormat.Pptx);
PFA the sample solution for VS 2013.
Sample.zip (76.9 KB)
Best regards
Christoph