Comments

Presentation slides sometimes must go through a review process. Comment is used as a means of communication during the review process.

The following example shows how you can create and customize Slide.Comments using the GemBox.Presentation API.

PowerPoint comments created with GemBox.Presentation
Screenshot of PowerPoint comments created with GemBox.Presentation
using GemBox.Presentation;

class Program
{
    static void Main()
    {
        // If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        var presentation = new PresentationDocument();

        // Create new presentation slide.
        var slide = presentation.Slides.AddNew(SlideLayoutType.Custom);

        // Adds a new comment with a new author in the top-left corner of the slide.
        var comment = slide.Comments.Add("GBP", "GemBox.Presentation", "Shows how to use comments with GemBox.Presentation component.");

        // Change comment position.
        comment.Left = Length.From(50, LengthUnit.Centimeter);
        comment.Top = Length.From(10, LengthUnit.Centimeter);

        // Adds a new comment with the same author as the previously added comment.
        slide.Comments.Add("Another comment from GemBox.Presentation.");

        presentation.Save("Comments.pptx");
    }
}
Imports GemBox.Presentation

Module Program

    Sub Main()

        ' If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY")

        Dim presentation = New PresentationDocument

        ' Create New presentation slide.
        Dim slide = presentation.Slides.AddNew(SlideLayoutType.Custom)

        ' Adds a New comment with a New author in the top-left corner of the slide.
        Dim comment = slide.Comments.Add("GBP", "GemBox.Presentation", "Shows how to use comments with GemBox.Presentation component.")

        ' Change comment position.
        comment.Left = Length.From(2, LengthUnit.Centimeter)
        comment.Top = Length.From(1, LengthUnit.Centimeter)

        ' Adds a New comment with the same author as the previously added comment.
        slide.Comments.Add("Another comment from GemBox.Presentation.")

        presentation.Save("Comments.pptx")
    End Sub
End Module

Want more?

Next example GitHub

Check the next example or select an example from the menu. You can also download our examples from the GitHub.


Like it?

Download Buy

If you want to try the GemBox.Presentation yourself, you can download the free version. It delivers the same performance and set of features as the professional version, but with some operations limited. To remove the limitation, you need to purchase a license.