# 使用 Python 去除 PPT 注释

> 去除PPT演示文稿评论的Python源码

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



## 通过 Python 去除 PPT 中的评论

为了从 PPT 文件中删除注释，我们将使用 [Aspose.Slides for Python via .NET](https://products.aspose.com/slides/zh/python-net/) API，这是一个功能丰富的 API，适用于 Python 平台的强大且易于使用的文档操作 API。

### 从 PPT 中删除注释 - Python

```python

import aspose.slides as slides

with slides.Presentation("example.ppt") as presentation:
    # Deletes all comments from the presentation
    for author in presentation.comment_authors:
        author.comments.clear()

    # Deletes all authors
    presentation.comment_authors.clear()

    presentation.save("example_out.pptx", slides.export.SaveFormat.PPTX)
```

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

通过 .NET 安装 **Aspose.Slides for Python**。请参阅 [**安装**](https://docs.aspose.com/slides/python-net/installation/)。

使用 Presentation 类的实例加载 PPT

遍历加载 PPT 的所有作者

删除作者的所有评论

最后删除所有作者

## 其他支持的注释格式
