// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET
// initialize PptFormat
PptFormat pptFormat = new PptFormat(Common.MapSourceFilePath(filePath));
// get hidden data
PptInspectionResult hiddenData = pptFormat.InspectDocument();
// get comments
PptComment[] comments = hiddenData.Comments;
if (comments.Length > 0)
{
// remove all comments
pptFormat.RemoveHiddenData(new PptInspectionOptions(PptInspectorOptionsEnum.Comments));
Console.WriteLine("Comments removed.");
// and commit changes
pptFormat.Save();
Console.WriteLine("Changes saved successfully!");
}
else
{
Console.WriteLine("No comments found!");
}