Add transparent hyperlink to a Portion using Aspose.Slides for .NET

Hi,


Is there a possibility to add transparent hyperlink to particular portion? I would like to add a hyperlink without changing any portion formatting. Right now, adding hyperlink changes portion color to blue and underlines it.

I know I can change hyperlink color globally via master color scheme, but that’s not good if I already have some portions with different colors.

Is there any workaround to achieve this?

Thanks,
Zeljko

Hi Zeljko,

I have observed your requirements and like to share that hyperlink is set in color scheme for presentation master theme. It cannot be set for individual slide’s text frame, portion of text. Attached please find the sample presentation that I have generated using PowerPoint. I have set the hyperlink color in presentation master theme and then on every reference of hyperlinks on two slides, it has same textual properties as set in master theme color scheme. One cannot change the textual properties of the hyperlink in this presentation. So, what you are looking for is unfortunately not possible even using PowerPoint.

If you are able to set the same in PowerPoint some way then please share the sample presentation fulfilling your requirements and we shall investigate that further on our end. Like PowerPoint implementation, the following sample code will be used for setting the hyperlink color in presentation master color scheme. 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);


}

Many Thanks,

Hello mudassier,
as of PowerPoint 2016 a formatting, although not being able to remove underlining, of a Hyperlink for portions seems to be possible:

“Beginning with PowerPoint 2016, you can also change the color of an individual hyperlink by directly using the text color control. See Add a hyperlink to a slide for more information.”

could you please implement this functionality

Kind regards,
Kristoffer

@ckoster,

I have observed your requirements and regret to inform that this is not supported yet. A ticket with ID SLIDESNET-40794 has been created as in our issue tracking system as a new feature request. We will look into the possibility of implementation of the requested feature. This thread has been associated with this new feature request, so that you can be automatically notified as soon as this issue is resolved.

The issues you have found earlier (filed as SLIDESNET-40794) have been fixed in this update.