Learn how to add a hyperlink to a PowerPoint presentation using the C# REST API. This step‑by‑step tutorial demonstrates how to programmatically insert a hyperlink into a PowerPoint file with a C# RESTful service, leveraging the .NET‑based Aspose.Slides Cloud SDK that supports all advanced presentation features. You’ll see how to select a specific slide and shape, then attach a custom hyperlink to it.
Prerequisite
- Create an account API credentials
- Download Aspose.Slides Cloud SDK for Dotnet for inserting hyperlinks
- Set up a 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 a hyperlink in PowerPoint using the C# REST Interface. You can configure a range of hyperlink attributes—including enabling or disabling the link, adding a tooltip, preserving navigation history, applying a click‑highlight effect, and stopping sound on click. Keep in mind that all of these properties are accessed by hovering over the hyperlink rather than by clicking it.
Now you’ve mastered adding a hyperlink to PowerPoint using the C# Low‑Code REST API. To explore inserting SmartArt into a slide, see our guide on Add SmartArt to PowerPoint with C# REST API.