Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents from any .NET(C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Mon Apr 15, 2019 12:27 pm

Hello.

1) Is there any way to directly replace one master slide with another? Or will it be implemented in future?
2) Is there any way to set a MasterSlideId for a slide, or only get? And will it be implemented in future?

AdamShakhabov
 
Posts: 40
Joined: Wed Sep 26, 2018 12:03 pm

Tue Apr 16, 2019 8:36 am

Hello,

Thank you for contacting.
Sorry I need to confirm the requirement with you. Do you want to change the slide layout from one MasterSlide to another MasterSlide? If so, you can refer to the following code snippet to achieve it. If this is not what you want, please provide more information about your requirement, then we will look into it.
Code: Select all
......
IMasterSlide master = ppt.Masters[0];
ppt.Slides[0].Layout = master.Layouts[0];
.....

Besides, Spire.Presentation only supports getting the MasterSlideId of a slide by ppt.Slides[0].MasterSlideID at present. However, we will consider adding a new feature to support setting a MasterSlideId for a slide. Once it is available in the future, we will keep you posted. Sorry for the inconvenience caused.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1045
Joined: Wed Apr 25, 2018 3:20 am

Wed Apr 17, 2019 7:10 am

Hello. OK, I should change my question, but to not to make new topic I will post it here:
Do you have, or will be implemented possibility to access (get) Slide Layout Shapes (elements)?

AdamShakhabov
 
Posts: 40
Joined: Wed Sep 26, 2018 12:03 pm

Wed Apr 17, 2019 7:53 am

Hello,

Thanks for your feedback.
Yes, you can use ppt.Slides[0].Shapes to get the layout shapes of slides. If there is any misunderstanding, please feel free to contact us.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1045
Joined: Wed Apr 25, 2018 3:20 am

Wed Apr 17, 2019 8:15 am

Sorry, I meant, Master Slide Layout elements (Shapes)

AdamShakhabov
 
Posts: 40
Joined: Wed Sep 26, 2018 12:03 pm

Wed Apr 17, 2019 10:22 am

Hello,

Thanks for your more information.
Please refer to the following code snippet to get Master Slide Layout elements(Shapes). If there is any question, please provide your testing file to help us further look into it. You could send it to us via email (support@e-iceblue).
Code: Select all
 
......
ActiveSlide layout = (ActiveSlide)ppt.Slides[0].Layout;
 ShapeCollection shapes = layout.Shapes;
......

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1045
Joined: Wed Apr 25, 2018 3:20 am

Fri May 17, 2019 8:58 am

Hello,

Glad to inform that we just released the Spire.Presentation Pack Hotfix Version:4.5.5 which support setting a MasterSlideId for a slide. Please download it and refer to the following code snippet to have a test.
Website link: https://www.e-iceblue.com/Download/download-presentation-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.Presentation/
Code: Select all
......
ppt.Slides[1].MasterSlideID = ppt.Slides[0].MasterSlideID;
......

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1045
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.Presentation