我正在尝试创建一个新的幻灯片母版并将其应用于当前演示文稿,代码如下:
var design = app.ActivePresentation.Designs.Add("my own design");
app.ActivePresentation.Apply??
我尝试过ApplyTheme和ApplyTemplate,它们都抛出异常
System.Runtime.InteropServices.COMException (0x80048240): Presentation (unknown member) : Invalid request. PowerPoint could not open the file.
at Microsoft.Office.Interop.PowerPoint.PresentationClass.ApplyTheme(String themeName)
有什么想法吗?提前谢谢。
答案 0 :(得分:0)
使用:
ActivePresentation.Slides.Range.Design = design