для C #
File.Copy(SourceFile,ExportedFile);
Вы в основном сохраняете оригинальный файл.
Теперь вы открываете ExportedFile
PowerPoint.Application ppApp = new PowerPoint.Application();
PowerPoint.Presentation presentation;
presentation = ppApp.Presentations.Open(ExportedFile, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);
Теперь повторяем все слайды / фигуры
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(); // or delete
shape.AddPicture(<your new picture>, MsoTriState.msoTrue, MsoTriState.msoTrue, left, top, width, height);
}
}
}
}
Надеюсь, это прояснит ваш запрос.