我在 PowerPoint 中创建了一个宏,该宏中间有一个错误,导致它无法在阅读视图模式下打开。
Sub OpenPowerPointInReadingView()
Dim pptApp As Object
Dim pptPresentation As Object
Set pptApp = CreateObject("PowerPoint.Application")
Set pptPresentation = pptApp.Presentations.Open("C:\Caminho\Para\Sua\Apresentacao.pptx")
pptPresentation.SlideShowSettings.Run.View = 3 ' ppViewSpeakerNotes
pptApp.Visible = True
End Sub
阅读视图没有常数,因此您必须告诉 PPT 按其自己的按钮。我已经删除了所有 ChatGPTjunk,添加了一行来按下右侧按钮,给我们这个:
Sub OpenPowerPointInReadingView()
Presentations.Open("C:\Caminho\Para\Sua\Apresentacao.pptx")
CommandBars.ExecuteMso ("ViewSlideShowReadingView")
End Sub