We deal with a code sample which retrieves the url of external links for a given presentation:
Private Function extractUrlsFromPst(ByVal pstPath As String) As String() Dim pst As Slides.Presentation = New Slides.Presentation(pstPath) Dim urls As List(Of String) = New List(Of String) For Each hlc As Slides.IHyperlinkContainer In pst.HyperlinkQueries.GetAnyHyperlinks Dim url As String = hlc.HyperlinkClick.ExternalUrl If url Is Nothing Then Continue For urls.Add(url) Next Return urls.OrderBy(Function(obj) obj).ToArray End Function
If one url ends with a named anchor (for example
#top), it won’t be kept in the
ExternalUrl class member, and I didn’t find it in another member. Is there a way to retrieve it?
You’ll find attached a sample file containing a link with a named anchor in the second slide.
links.zip (25.0 KB)