For C #
File.Copy(SourceFile,ExportedFile);
Basically you save the original file.
Now you open ExportedFile
PowerPoint.Application ppApp = new PowerPoint.Application(); PowerPoint.Presentation presentation; presentation = ppApp.Presentations.Open(ExportedFile, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);
Now drag all the slides / shapes
foreach (PowerPoint.Slide slide in presentation.Slides) { slide.Select(); foreach (PowerPoint.Shape shape in slide.Shapes) { if (shape.Type.ToString().Equals("<any type of shape>")) { if (shape.TextFrame.TextRange.Text.Equals("<contains a name")) { shape.TextFrame.TextRange.Text = <new value>; shape.Delete();
}
Hope this can clarify your request.
source share