[英]How to access custom Layout Slides through VBA
If I try to access custom layout slides, VBA error appears 如果我尝试访问自定义布局幻灯片,则会出现VBA错误
Following code shows error: 以下代码显示错误:
layout = ActivePresentation.SlideMaster.CustomLayouts(1)
How should I access custom layout slides? 我应该如何访问自定义布局幻灯片?
The Presentation object has a Designs collection (each Design is what we would have called a SmartMaster before). Presentation对象具有一个Designs集合(每个设计以前就是我们所说的SmartMaster)。
Each Design has a SmartMaster and the SmartMaster has a CustomLayouts collection that contains the layouts. 每个设计都有一个SmartMaster,而SmartMaster具有一个包含布局的CustomLayouts集合。 So:
所以:
Debug.Print ActivePresentation.Designs(1).SlideMaster.CustomLayouts(1).Name
That'll show you the name of the first layout (usually Title Slide) in the first master of the presentation. 这将为您显示演示文稿的第一个母版中第一个布局的名称(通常是Title Slide)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.