如何在 Excel VBA 中打开 "PPT file with new" 选项
How to open "PPT file with new" option in Excel VBA
我有以下代码可以打开 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
我有以下代码可以打开 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