Search code examples
powerpointoffice-interop

Is there a way to collapse/expand PowerPoint sections


All in the title.. Using Presentation.SectionProperties, I can add/delete/rename sections, but I cannot find a way to collapse/expand.


Solution

  • Interesting question, thanks for asking. Took me a bit to figure it out, but here's how:

    Dim oDW As DocumentWindow
    Set oDW = Windows(1)
    With oDW
        .ExpandSection 2, False
    End With
    

    Not a very intuitive use of the PPT object model, is it?