Cannot get picture object to align with horizontal center of slide...why?

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

The code looks fine. Are you sure the image does not have a white / transparent area to the right of the visible area? Here's what I gotr with your code on a standard picture (I commented Middles back in)

Just to be clear, the "never mind" only applied to the comment prior to this one, about the stepping-through. I'd still love to know why the macro won't center the picture object. I did try a version of the code where each slide is specifically selected, in which case the code DOES work, but I know it's bad practice to physically select objects, rather than just referring to them. Thanks!!

I don't know if this is useful, but you might be able to salvage some code from this VBA.
Currently it stands that, if you click an image (or more) then run this tool, it centers content on the slide.

Sub CenterOnSlide()
On Error GoTo err
With ActiveWindow.Selection.ShapeRange
'set to msoTrue to align to slide
'set to msoFalse to align to shapes
.Align msoAlignCenters, msoTrue
.Align msoAlignMiddles, msoTrue
End With
Exit Sub
err: 'error
MsgBox "Please select one or more shapes!"
End Sub