Class Designs (PowerPoint VBA)

The class Designs represents a collection of slide design templates. To use a Designs class variable it first needs to be instantiated, for example


Dim dsgs as Designs
Set dsgs = ActivePresentation.Designs

Add

Returns a Design object that represents a new slide design.

Add (designName, Index)


Dim strdesignName As String: strdesignName = 
Dim dsg As Design
Set dsg = ActivePresentation.Designs.Add(designName:=strdesignName)

Arguments

The following argument is required

designName (String) - The name of the design.

Optional arguments

The following argument is optional

Index (Long) - The index number of the design in the Designs collection. The default value is -1, which means that if you omit the Index parameter, the new slide design is added at the end of existing slide designs.

Clone

Creates a copy of a Design object.

Clone (pOriginal, Index)


Dim dsgClone As Design
Set dsgClone = ActivePresentation.Designs.Clone(pOriginal:=)

Arguments

The following argument is required

pOriginal (Design) - Design object. The original design.

Optional arguments

The following argument is optional

Index (Long) - The index location in the Designs collection into which the design will be copied. If Index is omitted, the cloned design is added to the end of the Designs collection.

Count

Returns the number of objects in the specified collection.


Dim lngCount As Long
lngCount = ActivePresentation.Designs.Count

Item

Returns a single Design object from the specified Designs collection.

Item (Index)

Index: The name or index number of the single Design object in the collection to be returned.


Dim dsg As Design
Set dsg = ActivePresentation.Designs(Index:=1)

Load

Returns a Design object that represents a design loaded into the master list of the specified presentation.

Load (TemplateName, Index)


Dim strTemplateName As String: strTemplateName = 
Dim dsgLoad As Design
Set dsgLoad = ActivePresentation.Designs.Load(TemplateName:=strTemplateName)

Arguments

The following argument is required

TemplateName (String) - The path to the design template.

Optional arguments

The following argument is optional

Index (Long) - The index number of the design template in the collection of design templates. The default is -1, which means the design template is added to the end of the list of designs in the presentation.