PowerPoint hyperlinks

A

Aurora I

Hi everyone,
Is it possible to get all hyperlinks (as Hyperlink) in a PowerPoint document
without running in ShideShow mode ?
VBA code snippet would be very much appreciated.

Thank you,
Aurora I.

www.smarttech.com
 
S

Steve Rindsberg

Hi everyone,
Is it possible to get all hyperlinks (as Hyperlink) in a PowerPoint document
without running in ShideShow mode ?
VBA code snippet would be very much appreciated.

Dim oSld as Slide
Dim oHlink as Hyperlink

For Each oSld in ActivePresentation.Slides
For Each oHlink in oSld.Hyperlinks
Debug.Print oHlink.Address
Debug.Print oHlink.Subaddress
' etc
Next
Next
 
A

Aurora I

Steve Rindsberg said:
Dim oSld as Slide
Dim oHlink as Hyperlink

For Each oSld in ActivePresentation.Slides
For Each oHlink in oSld.Hyperlinks
Debug.Print oHlink.Address
Debug.Print oHlink.Subaddress
' etc
Next
Next

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

Thank you. Now how do I get the shape the hyperlink is attached to ? I need
that because I am writing a PowerPoint to XMl.converter.
 
S

Steve Rindsberg

Thank you. Now how do I get the shape the hyperlink is attached to ? I need
that because I am writing a PowerPoint to XMl.converter.

Hyperlinks may be of either of two types:
msoHyperlinkRange hyperlinks applied to text
msoHyperlinkShape hyperlinks applied to a shape

Use the .Type property of the hyperlink (ie, oHlink.Type above) to determine
which. Depending on which it is, you can work your way up the "parent" tree to
the shape or (if you wish) textrange that contains the hyperlink.

That is, oHlink.Parent.Parent.Parent ...etc.

Experiment with it a bit; you'll get it.
 
A

Aurora I

Steve Rindsberg said:
Hyperlinks may be of either of two types:
msoHyperlinkRange hyperlinks applied to text
msoHyperlinkShape hyperlinks applied to a shape

Use the .Type property of the hyperlink (ie, oHlink.Type above) to
determine
which. Depending on which it is, you can work your way up the "parent"
tree to
the shape or (if you wish) textrange that contains the hyperlink.

That is, oHlink.Parent.Parent.Parent ...etc.

Experiment with it a bit; you'll get it.

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Thank you! I got it working!
Aurora
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top