Remove Comments and Comment Authors from PPTX in C++

Build C++ apps to manipulate comments and authors in presentation files using server-side APIs.

Remove Comments from PPTX via C++

Use Aspose.Slides for C++ to remove comments and comment authors from PPTX presentations. The example below clears the comments of each author from get_CommentAuthors and then clears the comment author collection.

Delete Annotations from PPTX - C++

auto presentation = MakeObject<Presentation>(u"example.pptx");

// Delete all comments from the presentation.
for (auto author : presentation->get_CommentAuthors())
{
    author->get_Comments()->Clear();
}

// Delete all authors.
presentation->get_CommentAuthors()->Clear();

presentation->Save(u"output.pptx", SaveFormat::Pptx);
presentation->Dispose();

How to Remove Comments from PPTX via C++

Follow these steps to remove comments and comment authors from a PPTX presentation.

  1. Install Aspose.Slides for C++. See Installation.
  2. Load the PPTX file with the Presentation class.
  3. Iterate through the comment authors from get_CommentAuthors.
  4. Clear the comments of each author with get_Comments()->Clear().
  5. Clear the comment author collection.
  6. Save the updated presentation with SaveFormat::Pptx.

Built with Aspose.Slides

Remove PPTX Comments Online

The free Aspose.Slides Annotation app is built with Aspose.Slides for C++, the same API as the code above. Open it and see what the API can do with your own PPTX files.

  • Runs in your browser, nothing to install.
  • See how Aspose.Slides removes comments before you write code.
  • Remove all comments from your PPTX file.
  • Download the cleaned file.

Other Supported Annotation Formats

Using C++, you can also remove annotations from other formats.