Пример #1
0
        public static void CreatePresentation(string filepath)
        {
            //Instantiate a Presentation object that represents a PPT file
            using (PresentationEx pres = new PresentationEx())
            {
                //Instantiate SlideExCollection calss
                SlideExCollection slds = pres.Slides;

                //Add an empty slide to the SlidesEx collection
                slds.AddEmptySlide(pres.LayoutSlides[0]);

                //Save your presentation to a file
                pres.Write(filepath);
            }
        }
Пример #2
0
        public static void AddingSlidetoPresentation()
        {
            string         MyDir = @"Files\";
            PresentationEx pres  = new PresentationEx();

            //Instantiate SlideCollection class

            SlideExCollection slds = pres.Slides;

            for (int i = 0; i < pres.LayoutSlides.Count; i++)
            {
                //Add an empty slide to the Slides collection
                slds.AddEmptySlide(pres.LayoutSlides[i]);
            }

            //Save the PPTX file to the Disk
            pres.Write(MyDir + "EmptySlide.pptx");
        }