Hello
When I attempt to clone a slide with custom animation and triggers the animations and triggers are lost. The relevant code is below. I have attached an example slide and the steps my customer follows when creating custom animations and triggers.
int progressPercent;
Aspose.Slides.Slide firstSlideInNewPres = _newPres.GetSlideByPosition(1);
foreach (string fileName in _sourceFiles)
{
progressPercent = Convert.ToInt32((Convert.ToDouble(_filesProcessed) /Convert.ToDouble( _totalFiles)) * 100.0);
base.ReportProgress(progressPercent, String.Format("Adding slide {0} of {1}", _filesProcessed + 1, _totalFiles));
if (File.Exists(fileName))
{
try
{
//aspose makes you declare and supply the SortedList for the CloneSlide method
System.Collections.SortedList sortedList = new System.Collections.SortedList();
Aspose.Slides.Presentation importPres = new Aspose.Slides.Presentation(fileName);Aspose.Slides.Slide slide = importPres.GetSlideByPosition(1);
importPres.CloneSlide(slide, _newPres.Slides.LastSlidePosition + 1, _newPres, sortedList);
}
catch (Exception ex)
{
_filesSkipped++;
}
}
else
{
_filesSkipped++;
}
_filesProcessed++;
progressPercent = Convert.ToInt32((Convert.ToDouble(_filesProcessed) /Convert.ToDouble( _totalFiles)) * 100.0);
base.ReportProgress(progressPercent, String.Format("Adding slide {0} of {1}", _filesProcessed, _totalFiles));
}
_newPres.Slides.Remove(firstSlideInNewPres);
try
{
_newPres.Write(_targetFile);
e.Result = "Success";
}
catch (Exception ex)
{
e.Result = ex;
}
Thanks