Learn how to programmatically add comments to a PowerPoint presentation using the C# REST API. This guide walks you through using the .NET‑based Aspose.Slides Cloud SDK to insert PowerPoint comments with the low‑code C# API, showing you how to configure each comment’s parameters before placing it on a slide.
Prerequisites
- Create an account API credentials
- Download the Aspose.Slides Cloud SDK for .NET for working with slide comments
- Set up a C# project that references the SDK to start adding comments to slides
Steps to Comments on PowerPoint Presentation with C# .NET-based API
- Create the SlidesApi object by setting the client ID and secret for adding comments
- Set the input presentation file name and the target slide index
- Define the slide comment and the relevant child comments collection
- Add the comments to the slide using the CreateComment method
- Fetch the comments count to confirm the addition of the comments
- Download the updated presentation file with new comments in it
These steps describe how to add comments in PowerPoint with C# RESTful Service. Set the input presentation file name and slide index, create the slide comment and sub-comments, and call the CreateComment() method to insert the comments by setting the input file name, target index, and comments. This call uploads the presentation, modifies it in the Cloud, and returns the collection of comments.
Code to Add PowerPoint Presentation Comments with C# REST API
This example illustrates how to add comments to a PowerPoint presentation with the C# RESTful Service. By populating a list of comments and assigning it to the ChildComments property, you can attach multiple child comments to a parent comment. Moreover, you can tailor each comment’s appearance and behavior by configuring any of the other exposed properties through the SlideComment method.
By now you’ve learned how to add comments to a PowerPoint slide using the C# REST API. Ready to enhance your presentations even further? Discover how to set an image as a slide background in our companion guide, Use picture as background in PowerPoint with C# REST API.