我找到了许多应该可以工作的示例脚本。
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中不存在此功能?
答案 0 :(得分:0)
John SR Wilson在微软答案论坛上找到了一种方法来解决这个问题所以我决定将它发布回来以防万一有人想知道
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!