Table of contents
TOC
折叠目录
展开目录

Presentation.TemplateName 属性 (PowerPoint)Presentation.TemplateName Property (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回与指定演示文稿相关联的设计模板的名称。只读。Returns the name of the design template associated with the specified presentation. Read-only.

语法Syntax

表达式模板名称expression. TemplateName

表达式_一个表示演示文稿对象的变量。_expression A variable that represents a Presentation object.

返回值Return Value

字符串String

注解Remarks

返回的字符串包含 MS-DOS 文件扩展名(对于已注册的文件类型),但不包括完整路径。The returned string includes the MS-DOS file name extension (for file types that are registered) but doesn't include the full path.

示例Example

以下示例中,如果设计模板“Professional.pot”尚未应用于演示文稿“Pres1.ppt”,则将该模板应用于该演示文稿。The following example applies the design template Professional.pot to the presentation Pres1.ppt if it is not already applied to it.

With Presentations("Pres1.ppt")
    If .TemplateName <> "Professional.pot" Then
        .ApplyTemplate "c:\program files\microsoft office" &; _
            "\templates\presentation designs\Professional.pot"
    End If
End With

另请参阅See also

概念Concepts

演示文稿对象Presentation Object

© 2018 Microsoft