Consulting

Results 1 to 2 of 2

Thread: Select all shapes on a slide that have transparent fill

  1. #1
    VBAX Newbie
    Joined
    Mar 2021
    Posts
    1
    Location

    Select all shapes on a slide that have transparent fill

    I'm after some VBA for PPT that selects all the shapes on a slide that have no fill (sorry I can't edit the title). Can anyone help please?

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Try this

    NOTE as written it will ignore placeholders which normally have no fill

    Sub selector()
    Dim osld As Slide
    Dim oshp As Shape
    Set osld = ActiveWindow.Selection.SlideRange(1)
    ActiveWindow.Selection.Unselect
    For Each oshp In osld.Shapes
    If oshp.Type <> msoPlaceholder Then
    If oshp.Fill.Visible = False Then oshp.Select Replace:=False
    End If
    Next oshp
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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