我想将主布局从一个演示文稿复制到另一个演示文稿。
如果我想复制幻灯片,代码将为 Presentation.Slides[1].Copy
,但是我找不到用于复制主布局的类似代码。有 Presentation.SlideMaster.Delete()
但由于某种原因没有副本。如果在 c# 中不可能,在 vba 中是否可以?
我想基本上实现自动化 this
最佳答案
这是将设计从一个演示文稿复制到另一个演示文稿的 VBA 代码 - http://skp.mvps.org/pptxp018.htm 。在 C# 中也可以实现同样的效果。
Sub CopyDesigns()
Dim oSourceDesigns As Presentation
Dim I As Integer
Set oSourceDesigns = Presentations.Open("K:\Docs\main.pot", , , False)
For I = 1 To oSourceDesigns.Designs.Count
ActivePresentation.Designs.Clone oSourceDesigns.Designs(I)
Next I
oSourceDesigns.Close
Set oSourceDesigns = Nothing
End Sub
关于C# 复制 powerpoint 主幻灯片布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40863326/