PPT section hiding macro

mabor
NewLounger
Posts: 3
Joined: 04 Jul 2011, 09:23

PPT section hiding macro

Post by mabor »

Working on a big deck, i am trying to make portions (sections) unhide based on a master "menu slide"

target is to have a customer "select" 1 or several sections from the menu slide in slideshow mode, and then display only the activated portions slides

I already can unhide "sections" with a macro that unhide each slides by number that i know to be in that section.
menu slide not hiding and all following slides hidden by initial macro
buttons activating each portion's "unhide macro" from the menu slide

but if i update the master deck, adding/deleting slides, my counter is off

hence my request to do it at the section level

any idea?

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PPT section hiding macro

Post by HansV »

Welcome to Eileen's Lounge!

To give us an idea of what you're working with, could you post the code that you currently have? Thanks in advance.
Best wishes,
Hans

User avatar
StuartR
Administrator
Posts: 12605
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: PPT section hiding macro

Post by StuartR »

Have you considered using the built in Custom show functionality in PowerPoint.
StuartR


mabor
NewLounger
Posts: 3
Joined: 04 Jul 2011, 09:23

Re: PPT section hiding macro

Post by mabor »

i am not using customs' show as i would need to create too many of them to offer all the "scenario" that a customer could choose with 10 possible sections

the solution to come back to the menu slide at the end of each section is possible, but i would like to avoid having to come back to that menu each time click again, etc. i'm trying out for a smooth experience for my Sales and customers
"pick from the menu at the beginning and go through each section one after the other without interruptions"


current code as follow
sub Clean()
Dim i As Long
For i = 3 To ActivePresentation.Slides.Count
ActivePresentation.Slides(i).SlideShowTransition.Hidden = msoTrue
Next i
End Sub

and

Sub part1()
ActivePresentation.Slides(52).SlideShowTransition.Hidden = msoFalse
ActivePresentation.Slides(53).SlideShowTransition.Hidden = msoFalse
ActivePresentation.Slides(54).SlideShowTransition.Hidden = msoFalse
End Sub

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PPT section hiding macro

Post by HansV »

Which version of PowerPoint are you using, and which version(s) might be used to display the slide show?

If PowerPoint 2010, you can use the new sections feature. See the following articles for example code using sections:
Sections
Make custom show from slides in a section
Best wishes,
Hans

mabor
NewLounger
Posts: 3
Joined: 04 Jul 2011, 09:23

Re: PPT section hiding macro

Post by mabor »

Hello Hans,

i am working on 2010.sections have been created already.
i understand how customs slide show.
i thought there could be a way that, within the slideshow mode, i could "append" a section's slides into my slideshow

can whole section be made visible/invisible from the main slideshow? (by section name and not having to go through each slide visibility status)

with regards to the "make customs show from slides in a section. will updating the slides (adding, deleting.. slides) within that section automatically modify the matching slideshow?

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PPT section hiding macro

Post by HansV »

Perhaps you can use code like this as starting point:

Code: Select all

Sub ToggleSection(n As Long)
  Dim i As Long
  With ActivePresentation.SectionProperties
    For i = .FirstSlide(n) To .FirstSlide(n) + .SlidesCount(n) - 1
      With ActivePresentation.Slides(i).SlideShowTransition
        .Hidden = Not .Hidden
      End With
    Next i
  End With
End Sub

Sub ToggleSection1()
  ToggleSection 1
End Sub

Sub ToggleSection2()
  ToggleSection 2
End Sub
Best wishes,
Hans