We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Hyperlinks attached to shapes

I am attempting to locate all of the hyperlinks attached to a shape on a given slide. I have been able to work with shapes that have valid links. My problem occurs when I encounter a shape that does not include a link. The resulting error is a System.NullReferenceException {"Object reference not set to an instance of an object."}. Currently, I am looping through each shape to verify if the link is valid. Am I approaching this the wrong way? Is there a way of telling if an shape has a link?

BTW: not all of the shapes contain a textFrame

Thanks in advance for your assistance.

This message was posted using Aspose.Live 2 Forum

Dear quark,

You can tell if the shape has link via Shape.Link property. e.g

if (shape.Link != null)


//yes shape has link