Writing a macro that selects a picture on a slide

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?
 
R

Rabin Moser

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top