Creating a list of Hyperlinks in PPT deck
I'm using Office Professional 2013 and I found a macro to find hyperlinks in a PowerPoint deck- see below. It works well, and steps through the deck and provides a message box (attached).
I want it to provide a list of all the links in the deck instead of a message box for each link found. Is this reasonable?
Sub ShowMeTheHyperlinks()
' Lists the slide number, shape name and address
' of each hyperlink
Dim oSl As Slide
Dim oHl As Hyperlink
For Each oSl In ActivePresentation.Slides
For Each oHl In oSl.Hyperlinks
If oHl.Type = msoHyperlinkShape Then
MsgBox "HYPERLINK IN SHAPE" _
& vbCrLf _
& "Slide: " & vbTab & oSl.SlideIndex _
& vbCrLf _
& "Shape: " & oHl.Parent.Parent.Name _
& vbCrLf _
& "Address:" & vbTab & oHl.Address _
& vbCrLf _
& "SubAddress:" & vbTab & oHl.SubAddress
Else
' it's text
MsgBox "HYPERLINK IN TEXT" _
& vbCrLf _
& "Slide: " & vbTab & oSl.SlideIndex _
& vbCrLf _
& "Shape: " & oHl.Parent.Parent.Parent.Parent.Name _
& vbCrLf _
& "Address:" & vbTab & oHl.Address _
& vbCrLf _
& "SubAddress:" & vbTab & oHl.SubAddress
End If
Next ' hyperlink
Next ' Slide
End Sub
|