PowerPoint VBA: Changing View to Slide Sorter

This PowerPoint VBA macro changes the view to the slide sorter view.

Macro Example

Sub ChangeViewToSlideSorter()

  ActiveWindow.ViewType = ppViewSlideSorter

End Sub

Description

[Application.]ActiveWindow

  ActiveWindow...

The [Application.]ActiveWindows property returns the active DocumentWindow object.

obj-PowerPoint-ActiveWindow

Because the ActiveWindow property is a member of the PowerPoint.Global class, we can omit the Application property.

ActiveWindow.ViewType

  ActiveWindow.ViewType...

The ActiveWindow.ViewType (DocumentWindow.ViewType property) returns or sets the type of the view contained in the document window.

We can specify the type of document window view by constants determined in the PpViewType enumeration.

In this case, we set the .

Sub ChangeViewToSlideSorter()

  ActiveWindow.ViewType = ppViewSlideSorter

End Sub

Properties

http://www.relief.jp/itnote/archives/powerpoint-vba-slide-sorter-view.php

Apply to

  • PowerPoint 2013
  • PowerPoint 2010
  • PowerPoint 2007