Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / September 2006

Tip: Looking for answers? Try searching our database.

Assigning Master to Slide per VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MikeH - 06 Sep 2006 09:41 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.