Writing a macro that selects a picture on a slide

  • Thread starter Thread starter Rabin Moser
  • Start date Start date
R

Rabin Moser

I am trying to automate picture sizing and centering for a PowerPoint show.
When I drag a picture onto a slide, it is not selected. I can manually select
it. I can also write a macro that selects the picture providing I know its
number (ie Picture X). Is there any way to select the only picture on the
slide without knowing its number?
 
Steve, I looked at the ID of objects being selected. I saw a "Picture 7" a
"Picture 8" and a "Rectangle 3". Not knowing the source of these numbers, I
wrote a macro that looks for Pictures 1-16 and Rectangles 1-16 on the slide
and selects whatever it finds. I am not sure if this is a good solution. It
certainly is not elegant, but seems to achieve the objective. Thank you very
much for your help. It was your suggestion of determining the type of the
object that helped me find the solution? Thanks again
 
Back
Top