Thread: [Solved] VBA: ppLayoutCustom
View Single Post
 
Old 03-14-2013, 07:56 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Slides.Add is legacy code from 2003. In 2010 you should use Slides.AddSlide

Sub MyLayout()
Dim ocust As CustomLayout
Set ocust = ActivePresentation.SlideMaster.CustomLayouts(2)' change number
ActivePresentation.Slides.AddSlide 1, ocust
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote