Solved

Show a CustomLayout on PowerPoint 2007/10 using VBA

Posted on 2010-08-16
2
791 Views
Last Modified: 2013-11-10
Hi,

My application uses several layouts. To make it easy for users to modify these layouts, I want to navigate to the correct layout used by the slide currently shown. On PowerPoint that would be clicking on View | Slide Master and then selecting the correct layout from the list on the slides panel.

My code would look something like:

' Get current slide layout used
Set myLayout = ActiveWindow.View.Slide.CustomLayout
' Show the slide master
ActiveWindow.ViewType = ppViewSlideMaster
' Select the layout
...

Open in new window


Apparently the View or Window object do not have a way to select a particular layout and assigning myLayout to ActiveWindow.View.Slide crashes PowerPoint (not surprising since it is expecting a slide, nor a layout). So, how do you do it.

Thank you ver much in advance.
0
Comment
Question by:momsoft2
2 Comments
 
LVL 23

Accepted Solution

by:
JSRWilson earned 500 total points
ID: 33445108
Not sure I understand, doesn't Powerpoint auto select the custom layout currently in use when you go to Master view?

You can click the button in code like his:

Application.CommandBars.ExecuteMso ("ViewSlideMasterView")
0
 

Author Comment

by:momsoft2
ID: 33452146
JSRWilson,

That was it. You are absolutely right. I wasn't aware of the ExecuteMso method. It is certainly a life saver.

Thank you very much.
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Setting the Scene Animations in PowerPoint are a great tool to convey messages when used carefuly with the content of your slides. There are plenty of animation effects and options, including a Repeat feature for individual animation effects. …
This video teaches viewers how to create handouts from their slides and helps them decide how many slides to include per handout.
The viewer will learn how to edit the master slide. They will also learn how to combine multiple themes into one master slide to use them in their presentation.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question