Consulting

Results 1 to 8 of 8

Thread: Hide/Reveal specific slide content during presentation mode

  1. #1

    Hide/Reveal specific slide content during presentation mode

    Hello, I am using PowerPoint to present product roadmaps.

    There is both high level and low level content on the roadmap, calling out major milestones and interim milestones respectively.

    For some audiences it is sufficient to show the high level content so I would like to hide the low level content for some presentations. However, in some cases, if the audience has a question to the low level content or if I have an audience where I need to present the low level content, I would like to be able to temporarily reveal it to support my answer. In my mind I am picturing a hide/show toggle that I could select on the slide to hide/show the content. Ideally the toggle needs to be available and work during presentation mode.

    The content I have to hide/show is a mixture of text, text boxes, and shapes.

    Ideally all content should be on one slide to keep administrative maintenance of the roadmap to a minimum.

    Is VBA the correct approach to solve this and do you have some guidance on how to implement?
    Last edited by davidolone; 08-15-2023 at 06:32 AM.

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Have a look here to see if this has some content of interest. PowerPoint offers you the chance to hide or unhide slides. https://support.microsoft.com/en-gb/...f-387931554d69
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    Quote Originally Posted by Aussiebear View Post
    Have a look here to see if this has some content of interest. PowerPoint offers you the chance to hide or unhide slides. https://support.microsoft.com/en-gb/...f-387931554d69
    Hiding and showing a complete slide is not the request.
    Im trying to hide/show specific content on a slide.

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Could you not just use triggered animation?
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    There's a hundred ways to skin a cat..... and so it is with slides with different levels of content. If you believe the audience is more suitable for High content then only show the high content, else if the audience asks a question that requires additional information (Low) then replace (Hide Unhide) the slide (Low for High).
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  6. #6
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    This is pretty crude and quick

    You need VBA to add a tag to a shape, since you can't do it from the UI so select a shape and run SetTag

    To flip the visibility of the shape, FlipTags reverses the state. There's also a ShowAll and a HideAll macro

    Option Explicit
    
    
    'https://learn.microsoft.com/en-us/office/dev/add-ins/powerpoint/tagging-presentations-slides-shapes
    
    
    Sub SetTag()
        Call ActiveWindow.Selection.ShapeRange.Tags.Add("admin", "yes")
    End Sub
    
    
    Sub FlipTags()
        Dim oSlide As Slide
        Dim oShape As Shape
        
        For Each oSlide In ActivePresentation.Slides
            For Each oShape In oSlide.Shapes
                If oShape.Tags.Item("admin") = "yes" Then oShape.Visible = Not oShape.Visible
            Next
        Next
    End Sub
    
    
    
    Sub ShowAll()
        Dim oSlide As Slide
        Dim oShape As Shape
        
        For Each oSlide In ActivePresentation.Slides
            For Each oShape In oSlide.Shapes
                If oShape.Tags.Item("admin") = "yes" Then oShape.Visible = msoTrue
            Next
        Next
    End Sub
    
    
    Sub HideAll()
        Dim oSlide As Slide
        Dim oShape As Shape
        
        For Each oSlide In ActivePresentation.Slides
            For Each oShape In oSlide.Shapes
                If oShape.Tags.Item("admin") = "yes" Then oShape.Visible = msoFalse
            Next
        Next
    End Sub
    
    If you really want to get fancy, you can make this selectively show/hide macros, add a macro button to a slide to only flip on that slide, etc.
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  7. #7
    Quote Originally Posted by John Wilson View Post
    Could you not just use triggered animation?
    Just played around with this and indeed using a trigger to start the animation works quite well to make the hidden objects visible on demand.
    Am I right in saying that the trigger can only progress the animation though?

    For example, if I make the hidden objects visible using the trigger, is there a way to “reset” the animation (so the objects are hidden) using another trigger for example?

    UPDATE:
    All sorted, thanks! I just use "Add Animation" to toggle the content to non-visible again.

    Thank you everyone for the input, this has been a big help!!

    https://www.youtube.com/watch?v=XZ8pehMyXDY
    Last edited by davidolone; 08-16-2023 at 08:51 AM.

  8. #8
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    You're welcome!
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •