我想通过PowerPoint 2016中的一个按钮运行bat文件(运行python脚本),如下所示:https://support.office.com/en-us/article/start-a-program-during-your-presentation-3854cb18-fcf0-4a18-a990-71c5149667df
在PowerPoint 2016中,此选项被禁用,如下所述:https://support.office.com/en-us/article/-run-programs-custom-action-is-disabled-in-powerpoint-2016-7607b815-675b-470c-8099-823c66d3a367
最后一个链接解释了如何修改注册表以重新启用此选项。当我启动regedit.exe时,我没有文件夹HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\PowerPoint\Security
。在浮子HKEY_CURRENT_USER\Software\Microsoft\Office
中,我有文件夹Excel
、PowerPoint
和Word
,在每个文件夹中都有一个文件夹Addins
。自己制作指定文件夹不起作用。在PowerPoint
文件夹中添加DWORD值本身也不起作用。
当我单击按钮时,PowerPoint中的按钮仍然什么也不做。我能做什么?提前谢谢。
发布于 2019-09-13 08:06:35
我用另一种方式解决了我自己的问题(通过做一个宏)。对于想要这样做的人的总结:
Private Sub CommandButton1_Click()
Dim sFullPathToExecutable As String
sFullPathToExecutable = "C:\path\to\file.bat"
Shell sFullPathToExecutable
End Sub
https://stackoverflow.com/questions/57870197
复制相似问题