Powerpoint 2010 VBA:检测幻灯片布局的更改 [英] Powerpoint 2010 VBA: Detect changes to slide layout

查看:94
本文介绍了Powerpoint 2010 VBA:检测幻灯片布局的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以检测幻灯片基本布局的添加/更改?

Is it possible to detect additions / changes to the base layout of a slide?

例如,如果我们有一张带有"两个内容布局"的幻灯片,然后幻灯片上应该有三个文本框架 - 标题和两个内容框架。鉴于此,是否有可能检测到第四个文本框架是否也已添加到幻灯片中?

For example, if we have a slide with the "Two content layout", then there should be three text frames on the slide - the title, and the two content frames. Given that, would it be possible to detect if a fourth text frame had been added to the slide as well?

我猜测Shapes集合中会有一个额外的对象,但有没有办法确定集合中的哪些对象是新到货?]

I'm guessing that there would be an additional object in the Shapes collection, but would there be any way of determining which of the objects in the collection was the new arrival?]

 

提前致谢。

推荐答案

在某种程度上!但它并不总是万无一失

To an extent! But it is not always fool-proof

你可以遍历幻灯片并获取shapes.count

You can loop through the slides and get the shapes.count

然后迭代计数并检查名称

and then iterate the count and check for the names

理想情况下,代码将为双内容幻灯片提供以下内容

Ideally, the code will give the following for a Two content slide

内容占位符n

内容占位符m

标题x

Content Placeholder n
Content Placeholder m
Title x

 


 ActivePresentation.Slides(i).Shapes(j).Name 


这篇关于Powerpoint 2010 VBA:检测幻灯片布局的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆