在操作菜单中自动更改 PowerPoint 形状的超链接
Automating the change in the Hyperlink of PowerPoint Shape in the Actions Menu
我在幻灯片 1 中有 50 个形状,名称为 1
、2
...50
。
我希望他们超链接到形状名称的幻灯片编号。
1
: Select 形状转到 Insert > Action > Hyperlink to > Slide... > Slide 1
5
: Select 形状转到 Insert > Action > Hyperlink to > Slide... > Slide 1
我可以通过单击形状播放宏来自动执行此操作
Sub GotoReqdSlide(oSh As Shape)
SlideShowWindows(1).View.GotoSlide Int(oSh.Name)
End Sub
但是,我正在寻找一种解决方案,即使在禁用宏的情况下也能使超链接正常工作。我尝试使用以下代码自动执行 Insert > Action > Hyperlink to > Slide... > Slide 1
的超链接过程,但没有成功。
For i = 1 To 50
ActivePresentation.Slides(3).Shapes(i).ActionSettings(ppMouseClick).Hyperlink = "Slide " & i
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
我在幻灯片 1 中有 50 个形状,名称为 1
、2
...50
。
我希望他们超链接到形状名称的幻灯片编号。
1
: Select 形状转到 Insert > Action > Hyperlink to > Slide... > Slide 1
5
: Select 形状转到 Insert > Action > Hyperlink to > Slide... > Slide 1
我可以通过单击形状播放宏来自动执行此操作
Sub GotoReqdSlide(oSh As Shape)
SlideShowWindows(1).View.GotoSlide Int(oSh.Name)
End Sub
但是,我正在寻找一种解决方案,即使在禁用宏的情况下也能使超链接正常工作。我尝试使用以下代码自动执行 Insert > Action > Hyperlink to > Slide... > Slide 1
的超链接过程,但没有成功。
For i = 1 To 50
ActivePresentation.Slides(3).Shapes(i).ActionSettings(ppMouseClick).Hyperlink = "Slide " & i
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