How to remove slides from PowerPoint using C #?

I want to remove a specific slide from a PowerPoint presentation using C #. Can someone help me with this?

+3
source share
2 answers

Open the PowerPoint stack and regular COM and use

var powerPoint = new Microsoft.Office.Interop.PowerPoint.Application();
var presentation = powerPoint.Presentations.Open(fileName);
presentation.Slides[x].Delete;
presentation.Save();
+4
source

You might want to check out Aspose for .NET . It provides a ton of libraries for interacting with Office file formats.

0
source

Source: https://habr.com/ru/post/1730500/


All Articles