HyperLinks in PPTX

Hi,

Can you help me to reach HyperlinkEx object in your api? I do not see how this is possible. I want to reach all hyperlinks which are placed in presentation text.
Also, is there any analogy with Link object in PPT api?

Just one more question, can I create new hyperlinks in PPTX file, and how I can place it somewhere in text? (e.g. I have: text text text hyperlink text text …).

I found that your api documentation is based on generic’s comments, and site documentation does not even have object model described.

Thanks,
Zeljko

Hi Zeljko,

Thanks for your interest in Aspose.Slides.

I have requested the development team for the resolution to specified issue. As soon as I receive any feedback from them, I will share that with you. We will also update the documentation for your kind reference as well.

Thanks and Regards,

Hi Zeljko,

We are sorry for the delayed response.

You can create hyperlinks in PPTX using HyperlinkEx objects and you can even find hyperlinks using simple logic. The hyperlinks in PPTX for text are added at portion level and also on shape level for ShapeEx objects. Please use the following code snippet to add hyperlinks to portion text. Since hyperlinks can be defined on shapes and portion levels so each shape and portion need to be traverse to see if there is a hyperlink associated with that. The code below will help you in understanding the concept.

//Opening first slide of presentation and acessing its first shape

PresentationEx Pres = new PresentationEx("D://ppt//Test_Dest.pptx");

SlideEx Slide = Pres.Slides[0];

Aspose.Slides.Pptx.ShapeEx Shp = Slide.Shapes[0];

//If HLink is null then no hyperlink is associated with shape

String shLink = Shp.HLinkClick.ExternalUrl;

//Getting TextFrame from shape and setting its text

AutoShapeEx aShp = (AutoShapeEx)Shp;

TextFrameEx TextFrame = aShp.TextFrame;

TextFrame.Paragraphs[0].Portions[0].Text = "Aspose.Slides";

//Setting Hyperlink for the portion text

HyperlinkEx HLink = new HyperlinkEx("http://www.aspose.com");

TextFrame.Paragraphs[0].Portions[0].HLinkClick = HLink;

//Setting other portion in same paragraph

PortionEx NewPortion = new PortionEx("Hello World");

TextFrame.Paragraphs[0].Portions.Add(NewPortion);

//Saving Presentation

Pres.Write("D://ppt//Test1.pptx");

Thanks and Regards,

Hi,

Thanks for response, it helped me a lot.

Best,
Zeljko