如何从 PowerPoint 中自动打开 link/url?

How to open a link/url automatically from PowerPoint?

我在 PPT 中有一个 link/url,我想在幻灯片出现时打开它,而无需单击它。可能吗? 谢谢

没有 "easy" 方法可以做到这一点。当你试图在 Office 中实现非标准的东西时,你必须使用 VBA.

此代码行应该可以解决您的问题:

ActivePresentation.Slides(1).Hyperlinks(1).Follow

如果你不熟悉在 Ppt 中使用 VBA,我建议你看一下指南,网上有很多:)

希望对您有所帮助! 祝你有美好的一天

Microsoft PowerPoint 为幻灯片放映期间显示的每张幻灯片触发 OnSlideShowPageChange() 事件。当显示某些幻灯片时,您可以使用此工具调用任何宏。 PowerPoint 将对 SlideShowWindow 的引用作为参数传递给 OnSlideShowPageChange() 事件。

我假设您在幻灯片 2 上有一个超链接。因此,在 VBA 模块中复制以下代码:

' --- The following macro displays a message when the second slide is shown.
' --- You are asked to open or not to open the link.
' --- The first link on slide 2 is opened when you click the OK button.

Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow)
    If SSW.View.CurrentShowPosition = 2 Then
        MsgBox "Second slide in the slide show"
        result = MsgBox("Open URL?", vbOKCancel)
        If result = vbOK Then
            ActivePresentation.Slides(2).Hyperlinks(1).Follow
        End If
    End If
End Sub

当然,您可以删除无用的代码行,以满足您跳过消息和问题的需要。