I am automating a complex presentation containing multiple masters.
As a reaction on a button click I create a new slide per VBA and now want to
assign the correct Master to it. How can I do this?
code snippet:
Set Sld = ActivePresentation.Slides.Add(pos, ppLayoutBlank)
' NOW I NEED TO ASSIGN THE CORRECT MASTER TO THE NEW SLIDE
If I assign the appropriate master design manually, the macro recorder isn't
really helpful, he always produces the line
ActivePresentation.ApplyTemplate FileName:=""
no matter what Design has been selected.
Thank you very much in advance for any answer. I really appreciate your
support.
/Mike
John Wilson - 06 Sep 2006 12:38 GMT
Hi Mike
You will need to use something like:
With ActivePresentation
.Slides(pos).Design = .Designs(2)
End With
-- This would apply the second design template, you can also rename the
masters and use eg =.Designs("johns")
Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
> I am automating a complex presentation containing multiple masters.
> As a reaction on a button click I create a new slide per VBA and now want to
[quoted text clipped - 14 lines]
> support.
> /Mike
Shyam Pillai - 06 Sep 2006 12:48 GMT
Mike,
Here are some examples involving designs in PowerPoint 2002 and later.
http://skp.mvps.org/pptxp007.htm
Regards,
Shyam Pillai
Animation Carbon
http://www.animationcarbon.com
>I am automating a complex presentation containing multiple masters.
> As a reaction on a button click I create a new slide per VBA and now want
[quoted text clipped - 16 lines]
> support.
> /Mike