# 使用 C++ 删除 PPTX 注释

> C++源码删除PPTX注释

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



## 通过 C++ 从 PPTX 中删除评论

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

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

```cpp

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

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

// 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++ 从 PPTX 中删除注释

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

使用 Presentation 类的实例加载 PPTX

遍历加载的 PPTX 的所有作者

删除作者的所有评论

最后删除所有作者

## 其他支持的注释格式
