深入探索PowerPoint的窗口、视图与幻灯片操作
1. 应用设计模板到幻灯片
可以将指定文件夹中的设计模板应用到活动演示文稿的特定幻灯片范围。例如,将存储在 Z:\Public\Template 文件夹中的名为 Disaster.pot 的设计模板应用到活动演示文稿的第一、第四和第六张幻灯片:
ActivePresentation.Slides.Range(Array(1, 4, 6)).ApplyTemplate _
FileName:="Z:\Public\Template \Disaster.pot"
2. 处理活动演示文稿
Application 对象的 ActivePresentation 属性返回一个 Presentation 对象,代表活动演示文稿(即活动窗口中的演示文稿)。不过,在使用 ActivePresentation 对象之前,最好先检查是否有窗口打开,避免出现错误。示例代码如下:
If Windows.Count = 0 Then
MsgBox "Please open a presentation before running this macro."
End
End If
3. 处理窗口和视图
PowerPoint
超级会员免费看
订阅专栏 解锁全文

47

被折叠的 条评论
为什么被折叠?



