Hi,
How can I set Hyperlink and Followed Hyperlink colors using Aspose.Slides for Java?
Please see the attached screenshots for your reference.
Thanks,
Zeljko
Zeljko
Hi,
Hi Zeljko,
I have observed your requirements and suggest you to please try using following sample code on your end to serve the purpose. I hope this will be helpful. Please share, if I may help you further in this regard.
public static void testLink()
{
Presentation pres = new Presentation();
ISlide slide = pres.getSlides().get_Item(0);
pres.getMasterTheme().getColorScheme().getHyperlink().setColor(Color.GREEN);
pres.getMasterTheme().getColorScheme().getFollowedHyperlink().setColor(Color.BLUE);
IAutoShape ashp = slide.getShapes().addAutoShape(ShapeType.Rectangle, 50, 50, 200, 200);
ashp.addTextFrame(“Test Link”);
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().getHyperlinkManager().setExternalHyperlinkClick(“www.google.com”);
pres.save(“C:\Aspose Data\GenPres.pptx”, SaveFormat.Pptx);
}