在阅读视图中自动打开 PowerPoint 文件

问题描述 投票:0回答:1

我在 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
vba powerpoint screen scrollviewreader
1个回答
0
投票

阅读视图没有常数,因此您必须告诉 PPT 按其自己的按钮。我已经删除了所有 ChatGPTjunk,添加了一行来按下右侧按钮,给我们这个:

Sub OpenPowerPointInReadingView()

Presentations.Open("C:\Caminho\Para\Sua\Apresentacao.pptx")
CommandBars.ExecuteMso ("ViewSlideShowReadingView")

End Sub
© www.soinside.com 2019 - 2024. All rights reserved.