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.

Mon Jan 28, 2019 3:36 pm

Hi,

Is there any way to create master slide using already existing templates or themes? I was hoping if I could import .potx file into my code and get the theme from there.

mohitnandkishore.kanojia@globalfoundries.com
 
Posts: 8
Joined: Mon Dec 17, 2018 9:21 pm

Tue Jan 29, 2019 7:45 am

Hi,

Thanks for your inquiry.
Please refer to the following code to have a try.
Code: Select all
Presentation pptx = new Presentation();
pptx.LoadFromFile(@"E:\\new.potx", FileFormat.Auto);
Presentation ppt = new Presentation();
//create a master slide         
ppt.Masters.AppendSlide(pptx.Masters[0]);
IMasterSlide master = ppt.Masters[1];
//apply this master
ppt.Slides[0].Layout = master.Layouts[0];
ppt.SaveToFile("E:\\result.pptx", FileFormat.Pptx2010);

If this doesn't meet your requirement, please provide more information, such as your .potx file and the desired file.

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Thu Feb 21, 2019 3:17 am

Hi,

Greetings from E-iceblue.
Did my code meet your requirement?
Could you please give us some feedback at your convenience? Thanks in advance.

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Return to Spire.Presentation