# 使用 C++ 删除 PPT 注释

> C++源码删除PPT注释

Source: https://products.aspose.com/slides/zh/cpp/annotation/ppt/
Updated: 2023-04-18



## 通过C++去除PPT中的评论

为了从 PPT 文件中删除注释，我们将使用 [Aspose.Slides for C++](https://products.aspose.com/slides/zh/cpp/) API，它功能丰富、功能强大且易于使用用于 C++ 平台的文档操作 API。

### 从 PPT 中删除注释 - C++

```cpp

using namespace Aspose::Slides;
using namespace Aspose::Slides::Export;
using namespace System::Drawing;

auto presentation = System::MakeObject<Presentation>(u"example.ppt");

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

// Deletes all authors
presentation->get_CommentAuthors()->Clear();
presentation->Save(u"example_out.pptx", SaveFormat::Pptx);
```

## 如何通过C++去除PPT中的评论

安装**Aspose.Slides for C++**。请参阅 [**安装**](https://docs.aspose.com/slides/cpp/installation/)。

使用 Presentation 类的实例加载 PPT

遍历加载 PPT 的所有作者

删除作者的所有评论

最后删除所有作者

## 其他支持的注释格式
