S
simonc
There doesn't seem to be a dedicated Powerpoint macro user group, so
hopefully someone here will know this:
I recorded a macro in which I selected a picture and resized it to 65% using
Picture Format>Size. However, when I looked at the macro in VBA editor it had
used the picture Width and Height properties and set these to an exact number
of pixels.
With ActiveWindow.Selection.ShapeRange
.Height = 437.25
.Width = 592.25
End With
So my macro will only produce the 65% reduction for a picture of exactly the
same size as the one I used to record it.
There are methods called ScaleWidth and ScaleHeight in the help but I can't
seem to get the syntax right for using these. If I put
With ActiveWindow.Selection.ShapeRange
.ScaleHeight = 0.65
End With
I get "Compile Error Argument not optional".
Can someone tell me what this means and how to correct it?
Many thanks
hopefully someone here will know this:
I recorded a macro in which I selected a picture and resized it to 65% using
Picture Format>Size. However, when I looked at the macro in VBA editor it had
used the picture Width and Height properties and set these to an exact number
of pixels.
With ActiveWindow.Selection.ShapeRange
.Height = 437.25
.Width = 592.25
End With
So my macro will only produce the 65% reduction for a picture of exactly the
same size as the one I used to record it.
There are methods called ScaleWidth and ScaleHeight in the help but I can't
seem to get the syntax right for using these. If I put
With ActiveWindow.Selection.ShapeRange
.ScaleHeight = 0.65
End With
I get "Compile Error Argument not optional".
Can someone tell me what this means and how to correct it?
Many thanks