Vba 自动更改“操作”菜单中PowerPoint形状的超链接
我在幻灯片1中有50个形状,分别命名为Vba 自动更改“操作”菜单中PowerPoint形状的超链接,vba,powerpoint,Vba,Powerpoint,我在幻灯片1中有50个形状,分别命名为1,2…50。 我想让他们超链接到形状名称的幻灯片编号 1:选择形状转到Insert>Action>Hyperlink to>Slide…>幻灯片1 5:选择形状转到Insert>Action>Hyperlink to>Slide…>幻灯片1 我可以通过单击形状来自动执行此操作 Sub GotoReqdSlide(oSh As Shape) SlideShowWindows(1).View.GotoSlide Int(oSh.Name) End Sub
1
,2
…50
。
我想让他们超链接到形状名称的幻灯片编号
1
:选择形状转到Insert>Action>Hyperlink to>Slide…>幻灯片1
5
:选择形状转到Insert>Action>Hyperlink to>Slide…>幻灯片1
我可以通过单击形状来自动执行此操作
Sub GotoReqdSlide(oSh As Shape)
SlideShowWindows(1).View.GotoSlide Int(oSh.Name)
End Sub
然而,我正在寻找一种解决方案,即使宏被禁用,也能允许超链接工作。我尝试了自动化Insert>Action>hyperlink to>Slide…>幻灯片1
使用以下代码,但没有成功
谢谢你的帮助。谢谢大家! 这就是你正在尝试的吗
Dim pp As Presentation
Set pp = ActivePresentation
Dim i As Long
For i = 1 To 50
With pp.Slides(3).Shapes(i).ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.SubAddress = pp.Slides(i).SlideNumber & _
". " & _
pp.Slides(i).Name
End With
Next i
Dim pp As Presentation
Set pp = ActivePresentation
Dim i As Long
For i = 1 To 50
With pp.Slides(3).Shapes(i).ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.SubAddress = pp.Slides(i).SlideNumber & _
". " & _
pp.Slides(i).Name
End With
Next i