We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to apply master template


We are using Aspose Slides .net 14.5.0 dll for building powerpoint(ppt/pptx). We are getting below error while trying to apply master template.

"Error removing layout slide: this layout slide is used in presentation." This error is occuring for both ppt and pptx. Also its replicable in .Net14.4.0 version as well.

Below is the code snippet where the exception was thrown

Presentation m_masterTemplate = new Presentation();
if (m_masterTemplate != null)
ISlide cloneSlide = m_show.Slides.AddClone(m_masterTemplate.Slides[0]);
IMasterSlide logoMaster = m_show.Slides[cloneSlide.SlideNumber - 1].LayoutSlide.MasterSlide;
foreach (ISlide slides in m_show.Slides)//AWQC-595 - Updated to Islide
slides.LayoutSlide.MasterSlide = logoMaster; // Exception occured in this line
m_show.Slides.Remove(m_show.Slides[cloneSlide.SlideNumber - 1]);

I am attaching the poc and master template used. It would be grateful if u can guide us resolving this issue as soon as possible.


Hi Divya,

I have worked with the sample project shared by you and have been able to reproduce the issue specified. It seems to be an issue while changing the slide master. An issue with ID SLIDESNET-35540 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,