共用方式為


_Presentation.ApplyTemplate Method

Applies a design template to the specified presentation.

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

Syntax

'Declaration
Sub ApplyTemplate ( _
    FileName As String _
)
'Usage
Dim instance As _Presentation
Dim FileName As String

instance.ApplyTemplate(FileName)
void ApplyTemplate(
    string FileName
)

Parameters

  • FileName
    Type: System.String
    Specifies the name of the design template.

Remarks

Note

If you refer to an uninstalled presentation design template in a string, a run-time error is generated. The template is not installed automatically regardless of your FeatureInstall property setting. To use the ApplyTemplate(String) method for a template that is not currently installed, you first must install the additional design templates. To do so, install the Additional Design Templates for PowerPoint by running the Microsoft Office installation program (click Add/Remove Programs or Programs and Features in Windows Control Panel).

See Also

Reference

_Presentation Interface

_Presentation Members

Microsoft.Office.Interop.PowerPoint Namespace