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

Free Support Forum - aspose.com

Support for adding hyperlink to external presentation (Java)

Does aspose slides java support adding a hyperlink to a slide in an external presentation?

I saw these but they’re not for slides java:

I’m familiar with adding an hyperlink to a slide within the same presentation - and adding one to an external site url.


I have shared sample code with. This will help you to achieve your requirements. If there is still an issue than please share expected output in form of presentation so that we may further investigate to help you out.

Presentation pres = new Presentation();

String url = “http://www.google.com/”;
String text = “www.google.com”;

ISlide slide = pres.getSlides().get_Item(0);
IAutoShape shape = pres.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 0, 0, 200, 250);
IPortionCollection portions = shape.getTextFrame().getParagraphs().get_Item(0).getPortions();

portions.add(new Portion("Visit "));

IPortion portion = new Portion();

portions.add(new Portion("."));

IHyperlink hyperlink = new Hyperlink(new Hyperlink(url), null, “”, false, false, false);

pres.save(pptoutput, SaveFormat.Ppt)

@Adnan.Ahmad - thanks but I’m not trying to link to an external site.

I’m trying to link from one powerpoint slide to another powerpoint slide.

I use aspose slides java to create MyPpt_1.pptx and MyPpt_2.pptx

I would like to have a slide in MyPpt_1.pptx have a hyper link that navigates to a slide in MyPpt_2.pptx


Can you please share sample in form of presentation for further investigation.