|
Home | VBA Section | General Section | Downloads | Licensing | Privacy Policy |
Understanding the new Designs Object in 2002 and 2003 PowerPoint 2002 introduces something that has been requested for a long time - support for multiple templates within the same presentation. Time to do away with earlier workarounds to simulate the same in 97/2000. With the introduction of multiple masters, how does one access the multiple templates? The new Designs collection helps you to iterate thru each template within the presentation and the Design object stores information about the template. A Design object consists of a slide master and/or a title master. The Designs collection will always consist of one Design object having a slide master. Note: PowerPoint 2007 introduces the new CustomLayouts object which changes the implementation of masters in PowerPoint 2007. This page will be updated to reflect it shortly.
An example to enumerate the Designs available in the presentation. Sub EnumDesigns() Dim lCtrA As Integer Dim oPres As Presentation Set oPres = ActivePresentation With oPres Debug.Print "Number of applied templates: " & .Designs.Count For lCtrA = 1 To .Designs.Count Debug.Print "Template Design name: " & .Designs(lCtrA).Name Debug.Print vbTab & "Slide master name: " & .Designs(lCtrA).SlideMaster.Name If .Designs(lCtrA).HasTitleMaster Then Debug.Print vbTab & "Title master name: " & .Designs(lCtrA).TitleMaster.Name Else Debug.Print vbTab & "No Title master present" End If Next lCtrA End With End Sub Designs can be added in one of the following ways:
|
Copyright © 1999-2008 Shyam Pillai. All rights reserved.
|