【问题标题】:How to delete slides from PowerPoint using c#?如何使用 C# 从 PowerPoint 中删除幻灯片?
【发布时间】:2010-01-29 04:30:43
【问题描述】:

我想使用 C# 从 PowerPoint 演示文稿中删除特定幻灯片。谁能帮我解决这个问题?

【问题讨论】:

  • 我建议查看 FileHelpers 库,但我不确定它们对 PowerPoint 有帮助。

标签: c# interop powerpoint


【解决方案1】:

打开 PowerPoint 堆栈和每个普通 COM 并使用

var powerPoint = new Microsoft.Office.Interop.PowerPoint.Application();
var presentation = powerPoint.Presentations.Open(fileName);

presentation.Slides[x].Delete();
presentation.Save();

【讨论】:

    【解决方案2】:

    您可能想查看Aspose for .NET。它提供了大量用于与 Office 文件格式交互的库。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-27
      • 1970-01-01
      相关资源
      最近更新 更多