小编Sup*_*ans的帖子

在 Excel 中使用 VBA 从 PowerPoint 模板创建新的 PowerPoint 演示文稿

我有一个 Excel 宏,可以从指定位置打开 PowerPoint 文件。PowerPoint 文件是一个模板。

我需要根据模板设计创建一个新的演示文稿。

我的代码将打开模板,而不是基于该模板的新演示文稿:

Sub Open_PowerPoint_Presentation()
    'Opens a PowerPoint Document from Excel
    
    Dim objPPT As Object
    
    Set objPPT = CreateObject("PowerPoint.Application")
    objPPT.Visible = True
    
    'Change the directory path and file name to the location
    'of your document
    
    objPPT.Presentations.Open "C:\Users\Colin\Documents\Custom Office Templates\PowerPoint Templates\Edge45 Monthly Report Template Macro.potm"
    
End Sub
Run Code Online (Sandbox Code Playgroud)

excel powerpoint vba templates

4
推荐指数
1
解决办法
9754
查看次数

标签 统计

excel ×1

powerpoint ×1

templates ×1

vba ×1