我有一个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