Master Slides

Each installed Keynote theme contains a set of slide designs, called master slides.

The Master Slide Class

master slide: [inh. slide > iWork container ] : A master slide in a presentation document.

elements

contained by document.

properties

nametext r/o ) : The name of the master slide.

Every slide added to a presentation is based upon the one of the parent theme’s master slides. The value of a slide’s base slide property is a reference to the master slide that the created slide was based upon.

The Base Slide Property (Excerpt from Slide Class)

slide: [inh. iWork container; see also Compatibility Suite] : A slide in a presentation document.

properties

base slidemaster slide ) : The master slide this slide is based upon.

The base slide property can be used in the making of a new slide, as well as be used to change the master slide of an existing slide.

New Slide with Master Slide

The following script demonstrates how to use the base slide property to create a new slide based upon a specific master slide.

Note that getting a list of the names of the master slides of a document (line 08) returns a list of the names of the master slides of the application theme applied to the document.

Changing the Master Slide of an Existing Slide

To change the master slide applied to a slide, change the value of the slide’s base slide property to a reference to another master slide.

Master slides are an element of the document class, not the slide class. If a reference to a master slide is constructed within a tell block targeting a slide (line 09), the script will error because the constructed reference to the master slide is invalid.  (⬇ see below ) 

master-slide-error

A solution for using a reference to a master slide within a tell block targeting a slide, is to create the reference OUTSIDE of the slide tell block, store it in a variable, and then use the variable inside the tell block:  (⬇ see below ) 

TOP | CONTINUE