We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to add slides from another presentation (merge 2/3 presentation together)

I cannot seem to get this to work.  I just want to take a list of PPTX files and output 1 presentation.

Works just fine if I comment out the for loop.

 //Creates a new instance of PowerPoint Presentation
                IPresentation presentation = Presentation.Create();
                BuildCover(presentation);
                foreach (var file in _files)
                {
                    if (!string.IsNullOrEmpty(file))
                    {
                        var libraryFileName = Server.MapPath("~//images//" + _clientFolder + "//" + file);
                        if (File.Exists(libraryFileName))
                        {
                            var p = Presentation.Open(libraryFileName);
                            foreach (var childSlide in p.Slides)
                            {
                                presentation.Slides.Add(childSlide);
                            }
                            //p.Close();
                        }
                    }
                }

                presentation.Save("SamplePresentation.pptx", FormatType.Pptx, Response);

1 Reply

MN Meikanda Nayanar Syncfusion Team June 12, 2015 09:56 AM UTC

Hi Amish,
Thank you for your update.
We have checked the code snippet and attached documents. When merging slides from two different presentation documents, the master slides and themes used in those slides also must be cloned to the destination presentation document. This feature is not supported in product version 13.1.0.30.
The implementation for this feature “Cloning and merging slides” was completed and this will be available in our upcoming 2015 Volume 2 release which is expected to be available at the end of June 2015.
We could see that you have created a direct trac incident for the same query. We are requesting you to follow-up with that incident for further assistance on this. Please let us know if you have any questions.
Thanks,
Meikandan

Loader.
Live Chat Icon For mobile
Up arrow icon