Add or Remove Hyperlinks in PowerPoint PPT in Java

Add or Remove Hyperlinks from PowerPoint PPT in Java

In various cases, we have to insert hyperlinks in the PowerPoint presentations, such as for providing the URL of a webpage. You can create a hyperlink of text, image, shape, or a media element in PowerPoint PPT slides. In this article, you will learn how to add hyperlinks to PowerPoint PPT/PPTX in Java. In the end, we will also discuss how to remove hyperlinks from PPT slides programmatically.

To insert or remove hyperlinks in PowerPoint presentations, we will use Aspose.Slides for Java. The API provides a bunch of features to create and manipulate PPT/PPTX presentations seamlessly. Also, it allows you to convert the presentations to other document or image formats. You can download its JAR or install it using the following Maven configurations.

Repository:
<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://repository.aspose.com/repo/</url>
</repository>

Dependency:
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>22.2</version>
    <classifier>jdk16</classifier>
</dependency>

The hyperlink in PowerPoint presentations can be added to a text, image, shape, audio, or video element. The following sections cover how to add hyperlinks to these elements in a PPT/PPTX presentation using Java.

The following are the steps to add a text hyperlink in a PowerPoint PPT/PPTX in Java.

The following code sample shows how to add a text hyperlink in a PowerPoint PPTX using Java.

The following steps demonstrate how to insert a shape hyperlink in a PowerPoint presentation in Java.

The following code sample shows how to create a hyperlink of shape in PowerPoint using Java.

The following are the steps to insert an image hyperlink in a PowerPoint PPT in Java.

The following code sample shows how to create a hyperlink of an image in PowerPoint using Java.

You can add an audio hyperlink to a PowerPoint PPT/PPTX by following the steps below:

The following code snippet demonstrates how to add an audio hyperlink in PowerPoint in Java.

To add a video hyperlink to a PowerPoint PPT/PPTX, follow the steps below:

The following code snippet demonstrates how to add a video hyperlink in PowerPoint in Java:

In this section, we will demonstrate how to remove the hyperlinks from a PowerPoint slide. These hyperlinks could be of any type we have discussed above. The following are the steps to perform this operation.

The following code sample shows how to remove hyperlinks from a slide in PowerPoint PPT in Java.

Get a Free License

Use Aspose.Slides for Java without evaluation limitations by getting a free temporary license.

Conclusion

In this article, you have learned how to add or remove hyperlinks in PowerPoint PPT in Java. Particularly, you have seen how to make hyperlinks of text, image, shape, audio, and video elements. Also, we have covered how to remove text or shape hyperlinks explicitly. Besides, you can explore more about Aspose.Slides for Java by visiting the documentation. Also, you can post your queries to our forum.

See Also