如何在Excel VBA中打开“新的PPT文件”选项

加内什·库马尔

我有下面的代码打开ppt文件,但是我需要使用新选项打开该文件(请参阅图片)。因此,现有文件不会在不知不觉中被打扰。请帮忙。

Sub openfile()
Dim objPP As Object
Dim objPPFile As Object
Set objPP = CreateObject("PowerPoint.Application")
objPP.Visible = True
Set objPPFile = objPP.Presentations.Open("E:\Test\Tempplate.pptx")
End Sub
拉希什·库克特
Sub openfile()
Dim objPP As Object
Dim objPPFile As Object
Set objPP = CreateObject("PowerPoint.Application")
objPP.Visible = True
ts = Format(Now(), "MMDDYYYY_HHMM")
fn = "E:\Test\New_" & Trim(ts) & ".pptx"
FileCopy "E:\Test\Tempplate.pptx", fn
Set objPPFile = objPP.Presentations.Open(fn)
End Sub 

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章