Share via


_Slide.ApplyTheme Method

Applies a theme or design template to the specified slide.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Sub ApplyTheme ( _
    themeName As String _
)
'Usage
Dim instance As _Slide
Dim themeName As String

instance.ApplyTheme(themeName)
void ApplyTheme(
    string themeName
)

Parameters

  • themeName
    Type: System.String
    The path and name of the theme file (.thmx) or design template file (.pot) to apply to the Slide object.

Examples

This example applies a saved theme to the specified slide:

ActivePresentation.Slides(1).ApplyTheme"C:\Program Files\Microsoft Office\Templates\MyTheme.thmx"

This example applies a saved design template to the specified slide:

ActivePresentation.Slides(1).ApplyTheme"C:\Program Files\Microsoft Office\Templates\MyTheme.pot"

See Also

Reference

_Slide Interface

_Slide Members

Microsoft.Office.Interop.PowerPoint Namespace