Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Prep4PDF preserves interactivity in PowerPoint presentations when you convert to PDF

Hide / Unhide shapes at will

Problem

You want to include shapes in your presentation but you need to hide them for some purposes, leave them visible at other times.

Solution

The first macro below will tag each selected shape for hiding/unhiding. You can select multiple shapes at a time.

Then when you run the HideUnhideTaggedShapes macro (further below) it will toggle the visibility of these tagged shapes on and off.

Option Explicit

Sub TagForHide()

    Dim oSh As Shape

    For Each oSh In ActiveWindow.Selection.ShapeRange
        oSh.Tags.Add "HideMe", "YES"
    Next

End Sub

Sub HideUnhideTaggedShapes()

    Dim oSl As Slide
    Dim oSh As Shape

    For Each oSl In ActivePresentation.Slides
        For Each oSh In oSl.Shapes
            If oSh.Tags("HideMe") = "YES" Then
                ' Make the visible hidden,
                ' or the hidden visible
                oSh.Visible = Not oSh.Visible
            End If
        Next
    Next

End Sub

Sub UndoAnOopsie()
' And in case things go pear-shaped,
' use this to unhide EVERYTHING

    Dim oSl As Slide
    Dim oSh As Shape

    For Each oSl In ActivePresentation.Slides
        For Each oSh In oSl.Shapes
            oSh.Visible = True
        Next
    Next

End Sub


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2015 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.
Español    Deutsch    Français    Português    Italiano    Nederlands    Greek    Japanese    Korean    Chinese

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Hide / Unhide shapes at will
http://www.pptfaq.com/FAQ00977_Hide_-_Unhide_shapes_at_will.htm
Last update 07 June, 2011
Created: