0

我发现了许多应该可以工作的示例脚本,例如

Sub DeleteLinks()
    Dim oSl As Slide
    Dim x As Long

    For Each oSl In ActivePresentation.Slides
        For x = oSl.Hyperlinks.Count To 1 Step -1
            oSl.Hyperlinks(x).Delete
        Next
    Next

End Sub

但是,当我尝试在 Mac 上的 Powerpoint 上运行它时,它给了我这个:

编译错误:找不到方法或数据成员

这是否意味着 Mac PPT VBA 中不存在此功能?

4

1 回答 1

0

John SR Wilson 在 Microsoft Answers 论坛上找到了解决此问题的方法,因此我决定将其发回此处以防万一有人想知道

See if this works on your Mac

Sub killMacLinks()
Dim ohl As Hyperlink
Dim osld As Slide
Dim asT As ActionSetting
Set osld = ActiveWindow.Selection.SlideRange(1)
For Each ohl In osld.Hyperlinks
Set asT = ohl.Parent
asT.Action = ppActionNone
Next
End Sub

If it works you can easily loop through all slides.
www.pptalchemy.co.uk

全部归功于 John SR Wilson!

于 2018-06-06T04:52:30.493 回答