简体   繁体   中英

How to access custom Layout Slides through VBA

If I try to access custom layout slides, VBA error appears

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).

Each Design has a SmartMaster and the SmartMaster has a CustomLayouts collection that contains the layouts. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM