Consulting

Results 1 to 2 of 2

Thread: Select only active slide images

  1. #1
    VBAX Newbie
    Joined
    May 2021
    Posts
    3
    Location

    Question Select only active slide images

    Hello everyone

    I need your valuable orientation with a request.
    Through VBA, i need to select all the images in the active slide but no the text boxes or any other shape.

    Thanks!!

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,014
    Location
    See if this does it
    Sub Image_select()
    Dim osld As Slide
    Dim opic As Shape
    On Error Resume Next
    'active slide make sure a slide is selected
    Set osld = ActiveWindow.Selection.SlideRange(1)
    'clear any already selected shapes
    ActiveWindow.Selection.Unselect
    For Each opic In osld.Shapes
    'select and do not clear previous selections
    If opic.Type = msoPicture Then opic.Select (msoFalse)
    If opic.Type = msoPlaceholder Then
    If opic.PlaceholderFormat.ContainedType = msoPicture Then opic.Select (msoFalse)
    End If
    Next opic
    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
  •