小编JMP*_*JMP的帖子

使用Excel VBA关闭Powerpoint对象(不使用Powerpoint.Application)

希望有人可以帮我一些VBA代码.我使用VBA循环将Excel图表,文本框和表格粘贴到Powerpoint模板中.但是,因为我无法确定用户是否安装了Powerpoint对象库,所以我不能将Dim PPTApp用作Powerpoint.Application类型语法.

我用对象.它很棒.除了一件:关闭Powerpoint.

码:

Dim oPPTPres As Object  ' Late binding: This is a PowerPoint.Presentation but we cannot assume that the Microsoft PowerPoint 11 library will be loaded in the workbook that this module has been copied to.
Dim oPPTShape As Object ' Late binding: This is a PowerPoint.Shapebut we cannot assume that the Microsoft PowerPoint 11 library will be loaded in the workbook that this module has been copied to.


PPTFile = Range("PPTFile").value ' Read PowerPoint template file name …
Run Code Online (Sandbox Code Playgroud)

excel powerpoint vba object

5
推荐指数
2
解决办法
3万
查看次数

标签 统计

excel ×1

object ×1

powerpoint ×1

vba ×1