Add or Remove Comments in PowerPoint PPT in C#

While reviewing the content in PowerPoint presentations, the comments are used to write the feedback. The comments can be added against a particular word, phrase, or anything on a PPT slide. In this article, you will learn how to add comments to PowerPoint PPT slides in C#. Moreover, we will cover how to read or remove slide comments and add their replies.

C# .NET API to Add Comments in PowerPoint

To manipulate comments in PowerPoint presentations, we will use Aspose.Slides for .NET. It is a powerful API to create and manipulate PowerPoint presentations. You can either download API’s DLL or install it using NuGet.

PM> Install-Package Aspose.Slides.NET

Add Comments to PowerPoint PPT in C#

In PowerPoint presentations, every comment is attached with a particular author. Whereas, each comment contains some additional information such as time of creation, slide where it is added, and its position. The following are the steps to add comments to a PPT slide in C#.

The following code sample shows how to add comments to PowerPoint PPT slides in C#.

The following is the screenshot of the comment we have added using the above code sample.

Insert Comments to PPT Slides in C#

Add Comment Replies in PPT in C#

Aspose.Slides also allows you to add replies to the comments. A reply itself is a comment which appears as a child of an existing comment. So let’s see how to add replies to comments in PowerPoint PPT slides in C#.

The following code sample shows how to add replies to comments in a PPTX slides in C#.

The following screenshot shows the output of the above code sample.

Add reply to the comments in PPT

Read Comments from PPT Slides in C#

Using Aspose.Slides, you can either read comments of a particular author or all the authors. The following are the steps to read comments in PPT slides in C#.

The following code sample shows how to read comments in PowerPoint PPT slides in C#.

Remove Comments from PowerPoint PPT in C#

In the previous section, you have seen how to read a comment by accessing it from the comments collection. Similarly, you can remove a comment after getting its reference. The following code sample shows how to remove comments in PowerPoint presentations in C#.

C# PowerPoint API - Get a Free License

You can work with PowerPoint PPT comments without evaluation limitations by getting a free temporary license.

Conclusion

In this article, you have learned how to add comments in PowerPoint PPT slides in C#. Moreover, we have covered how to add replies to the comments programmatically. At the end, we have demonstrated how to read or remove comments from PPT slides. You can visit the documentation to explore more about Aspose.Slides for .NET. Also, you can post your queries to our forum.

See Also