2016-01-11 45 views

回答

1

對此的解決方案雖然不太優雅,但可以使用VBAVBScript來重置幻燈片。以下是我使用VBScript重置所有幻燈片的解決方案。簡單地將文件拖放到以.vbs擴展名保存的腳本上。

Dim inputFile 
Dim objPresentation 

inputFile = WScript.Arguments(0) 
Set objPPT = CreateObject("PowerPoint.Application") 
objPPT.Visible = True 
objPPT.Presentations.Open inputFile 
Set objPresentation = objPPT.ActivePresentation 

slideCount = objPresentation.Slides.Count 

For i = 1 to slideCount 
    objPresentation.Slides(i).Select 
    objPresentation.Application.CommandBars.ExecuteMso("SlideReset") 
Next 

objPresentation.Save 
objPPT.Quit