top of page

Which Slides in a PowerPoint presentation have links to other files


The vba code posted to the site of PPTools here, will provide you with a list all files linked to in a PowerPoint presentation. Enter the below code in a new module and run it and it should generate a new graphic file for each slide which contains a link to another file.

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 Or to get a list off all the hyperlinks in the presentation in a text file:

Option Explicit

Sub FileEmDano() ' Lists the slide number, shape name and address ' of each hyperlink and saves the results to a file:

Dim oSl As Slide Dim oHl As Hyperlink Dim sTemp As String Dim sFileName As String

' Output the results to this file: sFileName = Environ$("TEMP") & "\" & "HyperlinkList.TXT"

For Each oSl In ActivePresentation.Slides For Each oHl In oSl.Hyperlinks If oHl.Type = msoHyperlinkShape Then sTemp = sTemp & "HYPERLINK IN SHAPE on Slide:" & vbTab & oSl.SlideIndex _ & vbCrLf _ & "Shape: " & oHl.Parent.Parent.Name _ & vbCrLf _ & "Address:" & vbTab & oHl.Address _ & vbCrLf _ & "SubAddress:" & vbTab & oHl.SubAddress & vbCrLf & vbCrLf Else ' it's text sTemp = sTemp & "HYPERLINK IN TEXT on Slide:" & vbTab & oSl.SlideIndex _ & vbCrLf _ & "Shape: " & oHl.Parent.Parent.Parent.Parent.Name _ & vbCrLf _ & "Address:" & vbTab & oHl.Address _ & vbCrLf _ & "SubAddress:" & vbTab & oHl.SubAddress & vbCrLf & vbCrLf End If Next ' hyperlink

Next ' Slide

Call WriteStringToFile(sFileName, sTemp) Call LaunchFileInNotePad(sFileName)

End Sub


Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

​

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

​

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page