PDA

View Full Version : How to change slide design without making a new layout?



Mel Turco
09-12-2010, 11:10 PM
PPT v2010

I have a caveat in my code that I'm trying to work out.

My code simply changes a given slide to another design and layout in the active presentation file. It applies a specific and existing master design and a specific and existing layout under that master. It works but in the process it may create a new layout in the destination master's layouts, which is not desirable. (If the original layout name does not exist in the destination's design layouts, it creates one, and I don't want it to or need it to.)

It has that caveat because converting the slide is a two stage process, right? It first applies the design and then the layout. At the point where it applies the design, PowerPoint creates a new layout in the destination's layouts. Then in the second stage it applies one of the existing layouts in the destination's layouts. BUT... it leaves the new layout it created as residue.

Is there a way to code this better to NOT create the additional layout or should I code logic to then remove the residual layout it created?

Snippit of the code I'm using...

With slSlide
.Design = ActivePresentation.Designs(iDes)
.CustomLayout = clLayoutChc
end with

Thanks,
-Melina