Presentation.TemplateName property (PowerPoint)
Returns the name of the first design/master associated with the specified presentation. Read-only.
Syntax
expression. TemplateName
expression A variable that represents a Presentation object.
Return value
String
Remarks
For pre-Office XML formats e.g. pot/ppt, the returned string previously returned the name of the template on which the presentation was created from, including the MS-DOS file name extension (for file types that are registered) but didn't include the full path. In the new XML formats e.g. potx/pptx, it now returns the name of the first design/master.
Example
The following example applies the design template Professional.potx to the presentation Pres1.pptx if it is not already applied to it.
With Presentations("Pres1.pptx")
If .TemplateName <> "Professional" Then
.ApplyTemplate "c:\program files\microsoft office" & _
"\templates\presentation designs\Professional.potx"
End If
End With
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.