Custom Layout is lost when inserting slide from file in PowerPoint 2016 RRS feed

  • General discussion

  • Hi,

    I'm working on a add-in for PowerPoint 2016, and I need to insert slides from another presentation to the active presentation. All the slides have custom layouts. I use PowerPoint.Slides.InsertFromFile method, but some of the inserted slides are without their custom layout. I noticed that these layouts are not added to SlideMaster.CustomLayouts collection of the active presentation.  Also, the CustomLayout on the Slide level is not the same as in the original presentation. 

    Does anyone know why the custom layouts are lost when inserting the slides, and how to fix this issue?



    Sunday, February 21, 2016 11:33 AM

All replies

  • hi, this might not answer your question but could be an alternative solution

    using Spire.Presentation;
    namespace InsertSlide
        class Program
            static void Main(string[] args)
                Presentation destPpt = new Presentation("destination.pptx", FileFormat.Pptx2010);
                Presentation sourcePpt = new Presentation("source.pptx", FileFormat.Pptx2010);
                //append slide from souce file to destination file
                destPpt.SaveToFile("destnation.pptx", FileFormat.Ppsx2010);

    Monday, June 6, 2016 5:58 AM