Format related procedures in class Master (PowerPoint VBA)

This page presents procedures from class Master related to the theme Format: ApplyTheme, BackgroundStyle, ColorScheme, CustomLayouts, Height, TextStyles, Theme and Width

ApplyTheme

Applies a theme or design template to the specified slide master, title master, handout master, notes master, or design master.

Syntax : expression.ApplyTheme (themeName)

themeName: The path and name of the theme file (.thmx) or design template file (.pot) to apply to the Master object.

ActivePresentation.SlideMaster.ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.thmx"

BackgroundStyle

Sets or returns the background style of the specified object.

The value of the BackgroundStyle property can be one of the MsoBackgroundStyleIndex constants.

ActivePresentation.SlideMaster.BackgroundStyle = msoBackgroundStyleMixed

ColorScheme

Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master.

Set ActiveWindow.Selection.SlideRange(1).ColorScheme = RGB(0,0,255)'blue

CustomLayouts

Returns a CustomLayouts object that represents the custom layouts associated with the presentation design of the specified Master object.

Dim clsCustomLayouts As CustomLayouts
Set clsCustomLayouts = ActivePresentation.SlideMaster.CustomLayouts

Height

Returns or sets the height of the specified object, in points.

The Height property of a Shape object returns or sets the height of the forward-facing surface of the specified shape. This measurement doesn't include shadows or 3D effects.

Dim sngHeight As Single
sngHeight = ActiveWindow.Selection.SlideRange(1).Height

TextStyles

Returns a TextStyles collection that represents three text styles — title text, body text, and default text — for the specified slide master.

For information about returning a single member of a collection, see Returning an object from a collection.

Dim tssTextStyles As TextStyles
Set tssTextStyles = ActiveWindow.Selection.SlideRange(1).TextStyles

Theme

Returns a Theme object that represents the theme used by the specified slide master, title master, handout master, notes master, or design master.

Dim oteTheme As Office.OfficeTheme
Set oteTheme = ActivePresentation.SlideMaster.Theme

Width

Returns the width of the specified object, in points.

Dim sngWidth As Single
sngWidth = ActiveWindow.Selection.SlideRange(1).Width