使用Excel宏删除PowerPoint幻灯片中的所有图表

时间:2019-06-13 11:49:34

标签: excel vba

我有以下代码:我试图删除幻灯片4中的三个图表。下面删除了其中两个图表,即使其中一个与其他两个图表具有相同的类型,也将其中一个保留。任何想法为什么会这样?

With PPApp.ActiveWindow
.View.GotoSlide Index:=4
For Each Chart In .View.slide.Shapes
    If Chart.Type = msoPicture Then
        Chart.Delete
    End If
Next

0 个答案:

没有答案
相关问题