Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Dec 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Please, help immediately for a beginner (macro to hide text) .. Urgent :)

    Good evening everyone ..

    I am not an expert or even a learner in powerpoint stuff, and I've searched for this a lot but couldn't know what to do.

    I have a powerpoint file that I want to hide all text in it, which means that I've created, say 70 slides, and each contains a picture and a text box in which I wrote. I want to hide all what I've written in these boxes, an I have hundreds of slides now so deleting text in each one individually will take all my time, and I do this now a few times each semester (studying purposes). I've read on the internet that there is an option called macro, in which I type a command and it gets applied to all slides. Can anyone here tell me how to create a macro and what to write so that all text is hidden ?

    Thank you so much in advance

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Sherine,

    Welcome to the Lounge as a new poster!

    Here's some code that may work for you but it does have some limitations as shown in the comments. I don't normally do macros in PP so maybe someone else has a better solution.
    Code:
    Option Explicit
    
    '  Assumes Slide background is set via Single Master Slide
    '  No slides with LOCAL background
    '  All text is Black or Automatic
    
    Sub SetInvisible()
    
       Dim lSlideColor As Long
       Dim oSlide      As Slide
       Dim oShape      As Shape
       
       lSlideColor = ActivePresentation.SlideMaster.Background.Fill.ForeColor.RGB
    
       For Each oSlide In ActivePresentation.Slides
          For Each oShape In oSlide.Shapes
             If oShape.Type = msoPlaceholder Then
               oShape.TextFrame.TextRange.Font.Color.RGB = lSlideColor
             End If
          Next oShape
       Next oSlide
       
    End Sub
    
    Sub SetVisible()
    
       Dim lSlideColor As Long
       Dim oSlide      As Slide
       Dim oShape      As Shape
    
       For Each oSlide In ActivePresentation.Slides
          For Each oShape In oSlide.Shapes
             If oShape.Type = msoPlaceholder Then
               oShape.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
             End If
          Next oShape
       Next oSlide
    
    End Sub
    Here's my test file for you to play with: Quotes.ppt

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Posting Permissions

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