Follow this guide on how to add hyperlink to PowerPoint with C# REST API. You will learn to automatically insert hyperlink in PowerPoint with C# RESTful Service using a .NET-based Cloud SDK supporting all the advanced features for working with presentations. It will assist you in selecting a particular slide and shape for adding a custom hyperlink.
Prerequisite
- Create an account API credentials
- Download Aspose.Slides Cloud SDK for Dotnet for inserting hyperlinks
- Setup C# project with the above SDK to add a link to a shape
Steps to Add a Link to PowerPoint with C# .NET-based API
- Instantiate the SlidesApi with the API key and secret for authentication
- Read the input file into a memory stream and upload it
- Set indexes of the slides and shapes for adding hyperlink (1-based index)
- Create a shape object with a hyperlink
- Update the shape on the specified slide with the hyperlink
- Print the updated hyperlink’s URL to the console for verification
- Download the updated presentation from the cloud as a stream and save it on the disk
These steps explain how to add hyperlink in PowerPoint with C# REST API. You may create a Shape and add a hyperlink by defining the action type and external URL. Finally, update the target shape in the desired slide using the newly created shape and save the output on the disk if required.
Code to Insert Link in PowerPoint with C# Low Code API
This code demonstrates how to insert hyperlink in PowerPoint with C# REST Interface. You can set various properties of a hyperlink such as a flag to enable/disable a hyperlink, tooltip, history, highlight click, and stop sound on click. Note that all these properties are available by hovering over the hyperlink rather than clicking it.
This article has taught us to create a hyperlink in PowerPoint with C# Low Code API. For adding a SmartArt in a slide, refer to the article on Add SmartArt to PowerPoint with C# REST API.