ajjava
05-28-2019, 12:37 PM
Here is the scenario, accomplished via VBA:
Picture object pasted to a slide from Excel
Picture object resized to be 90% of original size
Now I'd like to horizontally center the object on the slide
No matter what I try, the picture object ends up cocked to the left, rather than being centered with the slide.
The most current attempt is using .Align msoAlignCenters, msoTrue
The object is NOT centered on the slide
I also tried variations of .width/2, .height/2...and the object ended up halfway off the slide
Here is the snippet of the most current attempt:
osld.Shapes("Picture 2").Select
With ActiveWindow.Selection.ShapeRange
.ScaleHeight 0.9, msoTrue
.ScaleWidth 0.9, msoTrue
'set to msoTrue to align to slide
'set to msoFalse to align to shapes
.Align msoAlignCenters, msoTrue
'.Align msoAlignMiddles, msoTrue
End With
And what it returns:
24290
Picture object pasted to a slide from Excel
Picture object resized to be 90% of original size
Now I'd like to horizontally center the object on the slide
No matter what I try, the picture object ends up cocked to the left, rather than being centered with the slide.
The most current attempt is using .Align msoAlignCenters, msoTrue
The object is NOT centered on the slide
I also tried variations of .width/2, .height/2...and the object ended up halfway off the slide
Here is the snippet of the most current attempt:
osld.Shapes("Picture 2").Select
With ActiveWindow.Selection.ShapeRange
.ScaleHeight 0.9, msoTrue
.ScaleWidth 0.9, msoTrue
'set to msoTrue to align to slide
'set to msoFalse to align to shapes
.Align msoAlignCenters, msoTrue
'.Align msoAlignMiddles, msoTrue
End With
And what it returns:
24290