Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Wed Oct 13, 2021 4:08 pm

I am cloning a slide from one presentation to another. When the slide is added, can I specify to 'Keep Source Formatting'? If so, can you share a snippet.

majeed_s
 
Posts: 69
Joined: Thu Mar 25, 2021 4:13 pm

Thu Oct 14, 2021 2:17 am

Hello Majeed,

Thanks for your inquiry.
'Keep Source Formatting' format is used by default when cloning a silde from one presentation to another. Please refer to the following code.
Code: Select all
 Presentation source = new Presentation();
            source.LoadFromFile("sample.pptx");
            Presentation target = new Presentation();
            target.LoadFromFile("new.pptx");
           
            target.Slides.Append(source.Slides[0]);

            target.SaveToFile("output.pptx",Spire.Presentation.FileFormat.Pptx2013);


Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Fri Oct 22, 2021 8:06 am

Dear Majeed,

Greetings from E-iceblue!
Has your issue been solved?
Looking forward to your feedback.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Presentation