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

Free Support Forum - aspose.com

Slide master changing

hi
I tried a program which can copy slide master and the design template from one to another slide and save result in new presentation.( actually what i need is apply each slide with different slide master and different design ) but its seems to be not working …
can any one reply me please whats did i do incorrectly.
thanks

Gayan

Codes are given bellow

Aspose.Slides.Presentation _presentationOne;
Aspose.Slides.Presentation _presentationTwo;

_presentationOne = new Aspose.Slides.Presentation(“D:\temfolder\static1.ppt”);
_presentationTwo = new Aspose.Slides.Presentation(“D:\temfolder\STATIC2.ppt”);
foreach ( Aspose.Slides.Slide ss in _presentationOne.Slides)
{
ss.ChangeMaster(_presentationTwo.GetSlideById(_presentationTwo.Slides[0].MasterId), true);
}
_presentationOne.Write(“D:\temfolder\new.ppt”);


Hello,

ChangeMaster method doesn’t clone any slides or masters.
Slide and master slide should be in the same presentation.

Hi Alexey

what I need to get slide master from one slide and apply to other slide in another presentation . does this mean I want able to copy slide master from separate slide and apply for a another slide in another presentation. if not possible can you please guide me how to do

Hello Gayan,

At first, you should clone slide (which attached to master slide you want to clone) to another presentation.
In this case master slide will be cloned automatically. You will find code example in the Programmer’s Guide.
After that you can change master. Don’t forget to delete cloned slide after all.

Hello Gyan,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Also see the code in this thread; it is exactly what Alexey has explained you.

http://www.aspose.com/Community/Forums/79025/ShowThread.aspx#79025