OfficeTips Home || VBA Section || General Section || Download Section || Privacy Policy

Selecting the slide master slide

Normally you would never need this however if your operation is view based and you want to select the slide master of a given design you might be wondering on how to do this because there is no Select method available to activate the slide master object itself even though there is a Select available on the CustomLayout object.

You could take the example further to ensure that this operation does not dirty the presentation by storing the Saved state prior to the operation and then restoring it.


Sub SelectSlideMaster(DesignIndex)

'Move the design to the 1st position

ActivePresentation.Designs(DesignIndex).MoveTo 1
' Next, switch to the master slide view
' This operation will always select the slidemaster of the first design in the deck

If Val(Application.Version) < 15 Then
    ActiveWindow.ViewType = ppViewSlideMaster
    ActiveWindow.ViewType = ppViewMasterThumbnails
End If
' Restore the design back to the original position
' Selection is retained so now you have the desired slide master activated

ActivePresentation.Designs(1).MoveTo DesignIndex

End Sub



Copyright 1999-2016 (c) Shyam Pillai. All rights reserved.