A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.
The subaddress is a string
"The target SlideID ,Target slideIndex , Target slide title"
So to target slide 3 you could use
Sub actionbutt()
Dim sldID As String
Dim sldInd As String
Dim sldTitle As String
Dim oshp As Shape
'To link to slide 3
With ActivePresentation.Slides(3)
sldID = CStr(.SlideID)
sldInd = CStr(.SlideIndex)
If .Shapes.HasTitle Then sldTitle = .Shapes.Title.TextFrame.TextRange.Text
If sldTitle = "" Then sldTitle = "Slide" & CStr(.SlideIndex)
With ActivePresentation.Slides(1).Shapes
Set oshp = .AddShape(msoShapeActionButtonForwardorNext, 10, 10, 40, 30)
With oshp.ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.SubAddress = CStr(sldID) & "," & CStr(sldInd) & "," & sldTitle
End With
End With
End With
End Sub
Note slideIDs may NOT be sequential.
Edit by John Korchok, Sept. 13, 2018:
This may have changed in the last few years, but .Hyperlink.Subaddress only accepts the slide title, not the index or the ID. So only
.Hyperlink.SubAddress = sldTitle
is working here.